floor()
public
Returns the largest integer less than or equal to flt.
1.2.floor
2.0.floor
(-1.2).floor
(-2.0).floor
Show source
static VALUE
flo_floor(VALUE num)
{
double f = floor(RFLOAT_VALUE(num));
long val;
if (!FIXABLE(f)) {
return rb_dbl2big(f);
}
val = f;
return LONG2FIX(val);
}