class Numeric
Public Instance Methods
inverse()
click to toggle source
Returns its inverse.
@return [Numeric] inverse
@example
Rational(7, 22).inv #=> (22/7) Integer(16).inv #=> (1/16) Float(16).inv #=> 0.0625 Complex(3, 4).inv #=> ((3/25)-(4/25)*i)
# File lib/numeric_inverse/ext/numeric.rb, line 13 def inverse 1.quo(self) end
Also aliased as: inv