Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Numeric#phase
() -> (0 | ::Float)
phase
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 zero if self is positive, Math::PI otherwise.