method

floor

v2_2_9 - Show latest stable - Class: Float
floor()
public

Returns the largest integer less than or equal to float.

1.2.floor      #=> 1
2.0.floor      #=> 2
(-1.2).floor   #=> -2
(-2.0).floor   #=> -2