Method: Numeric#mulmod
- Defined in:
- lib/epitools/core_ext/numbers.rb
#mulmod(n) ⇒ Object
Multiply self by n, returning the integer product and the floating point remainder.
159 160 161 162 163 164 |
# File 'lib/epitools/core_ext/numbers.rb', line 159 def mulmod(n) prod = self * n intprod = prod.to_i [intprod, prod % intprod] end |