floor(ndigits = 0) -> Integer | Float
[permalink][rdoc]自身と等しいかより小さな整数のうち最大のものを返します。
1.2.floor # => 1
2.0.floor # => 2
(-1.2).floor # => -2
(-2.0).floor # => -2
1.234567.floor(2) # => 1.23
1.234567.floor(3) # => 1.234
1.234567.floor(4) # => 1.2345
1.234567.floor(5) # => 1.23456
34567.89.floor(-5) # => 0
34567.89.floor(-4) # => 30000
34567.89.floor(-3) # => 34000
34567.89.floor(-2) # => 34500
34567.89.floor(-1) # => 34560
34567.89.floor(0) # => 34567
34567.89.floor(1) # => 34567.8
34567.89.floor(2) # => 34567.89
34567.89.floor(3) # => 34567.89
[SEE_ALSO] Numeric#ceil, Numeric#round, Float#truncate