End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#angle
num.angle → 0 or float
complex.c
View on GitHub ↗
static VALUE
numeric_arg(VALUE self)
{
if (f_positive_p(self))
return INT2FIX(0);
return DBL2NUM(M_PI);
}
Alias of #arg
Returns 0 if the value is positive, pi otherwise.