round()
public
Rounds num to the nearest integer. Numeric implements this by converting itself to a
Float and invoking Float#round.
Show source
/*
* call-seq:
* num.round => integer
*
* Rounds <i>num</i> to the nearest integer. <code>Numeric</code>
* implements this by converting itself to a
* <code>Float</code> and invoking <code>Float
*/
static VALUE
num_round(num)
VALUE num;
{
return flo_round(rb_Float(num));
}