Method: Processing::GraphicsContext#map
- Defined in:
- lib/processing/graphics_context.rb
#map(value, start1, stop1, start2, stop2) ⇒ Numeric
Maps a number from range start1..stop1 to range start2..stop2.
1410 1411 1412 |
# File 'lib/processing/graphics_context.rb', line 1410 def map(value, start1, stop1, start2, stop2) lerp start2, stop2, norm(value, start1, stop1) end |