Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/kmat/misc.rb
Instance Method Summary collapse
Instance Method Details
#limit(min, max) ⇒ Object
113 114 115 116 117 118 119 120 121 |
# File 'lib/kmat/misc.rb', line 113 def limit(min, max) if ( self < min ) then min elsif ( max < self ) then max else self end end |