map(-30, -89.75, 89.75, 0, 360)
I'm looking for something like this where:
- -30 is the input value.
- -89.75 to 89.75 is the range of possible input values
- 0 - 360 is the final range to be mapped to
I was told there is a way to do this using http://ruby-doc.org/core-1.9.3/Enumerable.html#method-i-map
.. however its not readily apparent !