float.modulo(other) â float Instance Public methods Return the modulo after division of float by other. 6543.21.modulo(137) #=> 104.21 6543.21.modulo(137.24) #=> 92.9299999999996
flt.magnitude â float Instance Public methods Returns the absolute value of flt. (-34.56).abs #=> 34.56 -34.56.abs #=> 34.56
inspect() Instance Public methods Alias for: to_s
flt.infinite? â nil, -1, +1 Instance Public methods Returns nil, -1, or +1 depending on whether flt is finite, -infinity, or +infinity. (0.0).infinite? #=> nil (-1.0/0.0).infinite? #=> -1 (+1.0/0.0).infinite? #=> 1
flt.hash â integer Instance Public methods Returns a hash code for this float.
flt.floor â integer Instance Public methods Returns the largest integer less than or equal to flt. 1.2.floor #=> 1 2.0.floor #=> 2 (-1.2).floor #=> -2 (-2.0).floor #=> -2
flt.finite? â true or false Instance Public methods Returns true if flt is a valid IEEE floating point number (it is not infinite, and nan? is false).
float.quo(numeric) â float Instance Public methods Returns float / numeric.
flt.eql?(obj) â true or false Instance Public methods Returns true only if obj is a Float with the same value as flt. Contrast this with Float#==, which performs type conversions. The result of NaN.eql?(NaN) is undefined, so the implementation-dependent value is returned. 1.0.eql?(1) #=> false
float.divmod(numeric) â array Instance Public methods See Numeric#divmod. 42.0.divmod 6 #=> [7, 0.0] 42.0.divmod 5 #=> [8, 2.0]
Page 2072 of 2275