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.
1384 1385 1386 |
# File 'lib/processing/graphics_context.rb', line 1384 def norm(value, start, stop) (value.to_f - start.to_f) / (stop.to_f - start.to_f) end |