instance method
Numeric#arg
() -> ::Numeric
arg → 0 or Math::PI
complex.c
View on GitHub ↗
static VALUE
numeric_arg(VALUE self)
{
if (f_positive_p(self))
return INT2FIX(0);
return DBL2NUM(M_PI);
}
Returns zero if self is positive, Math::PI otherwise.