Method: Float#to_b

Defined in:
lib/mug/bool.rb

#to_bObject

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