method
floor
floor(*args)
public
Returns the largest number less than or equal to int with a precision of ndigits decimal digits (default: 0).
When the precision is negative, the returned value is an integer with at least ndigits.abs trailing zeros.
Returns self when ndigits is zero or positive.
1.floor #=> 1 1.floor(2) #=> 1 18.floor(-1) #=> 10 (-18).floor(-1) #=> -20