Path: | lib/eymiha/math/rectify.rb |
Last Update: | Sat Mar 22 09:45:12 -0400 2008 |
Rectification maps values to an limits treated either as cycles, upper bounds, lower bounds or both. Four methods are added to the Numeric class:
wrap_rectify() wraps values to an interval treated as a cycle. Think of it as degrees around a compass.
cut_rectify() cuts off values to keep them between an upper and lower bound.
at_most() cuts off values at an upper bound.
at_least() cuts off value at a lower bound.