Class: Float
Instance Method Summary collapse
-
#to_b ⇒ Object
Converts num to a boolean.
Instance Method Details
#to_b ⇒ Object
Converts num to a boolean. Returns true if not zero or NaN. Note: -0.0 is false, and +/-infinity are true.
46 47 48 |
# File 'lib/mug/bool.rb', line 46 def to_b !(self.zero? || self.nan?) end |