floor()
public
Returns the largest integer less than or equal to num. Numeric implements this by converting anInteger to a Float and invoking Float#floor.
1.floor
(-1).floor
Show source
/*
* call-seq:
* num.floor => integer
*
* Returns the largest integer less than or equal to <i>num</i>.
* <code>Numeric</code> implements this by converting <i>anInteger</i>
* to a <code>Float</code> and invoking <code>Float#floor</code>.
*
* 1.floor
* (-1).floor
*/
static VALUE
num_floor(num)
VALUE num;
{
return flo_floor(rb_Float(num));
}