Class: Eqn::Function::RoundDown

Inherits:
Node
  • Object
show all
Defined in:
lib/eqn/function.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



36
37
38
39
40
# File 'lib/eqn/function.rb', line 36

def value
  value = elements.shift.value
  fail ZeroDivisionError if value.is_a?(Float) && (value.abs == Float::INFINITY || value.nan?)
  value.floor
end