APIdock / Ruby
/
method

angle

ruby latest stable - Class: Complex
angle()
public

Returns the angle part of its polar form.

Complex .polar (3, Math ::PI/2).arg  #=> 1.5707963267948966
static VALUE
nucomp_arg(VALUE self)
{
 get_dat1(self);
 return rb_math_atan2(dat->imag, dat->real);
}

AltStyle によって変換されたページ (->オリジナル) /