Method: Numeric#angle

Defined in:
complex.c

#arg0, Float #angle0, Float #phase0, Float

Returns 0 if the value is positive, pi otherwise.

Overloads:



1988
1989
1990
1991
1992
1993
1994
# File 'complex.c', line 1988

static VALUE
numeric_arg(VALUE self)
{
    if (f_positive_p(self))
	return INT2FIX(0);
    return rb_const_get(rb_mMath, id_PI);
}