Method: Processing::GraphicsContext#norm
- Defined in:
- lib/processing/graphics_context.rb
#norm(value, start, stop) ⇒ Numeric
Normalize the value from range start..stop into 0..1.
2668 2669 2670 |
# File 'lib/processing/graphics_context.rb', line 2668 def norm(value, start, stop) (value.to_f - start.to_f) / (stop.to_f - start.to_f) end |