abs()
public
Returns the absolute value of flt.
(-34.56).abs
-34.56.abs
Show source
/*
* call-seq:
* flt.abs => float
*
* Returns the absolute value of <i>flt</i>.
*
* (-34.56).abs
* -34.56.abs
*
*/
static VALUE
flo_abs(flt)
VALUE flt;
{
double val = fabs(RFLOAT(flt)->value);
return rb_float_new(val);
}