Method: Float#arg
- Defined in:
- complex.c
#arg ⇒ 0, Math::PI
Returns 0 if self is positive, Math::PI otherwise.
2453 2454 2455 2456 2457 2458 2459 2460 2461 |
# File 'complex.c', line 2453 static VALUE float_arg(VALUE self) { if (isnan(RFLOAT_VALUE(self))) return self; if (f_tpositive_p(self)) return INT2FIX(0); return rb_const_get(rb_mMath, id_PI); } |