Method: Complex#rect
- Defined in:
- complex.c
permalink #rect ⇒ Array #rectangular ⇒ Array
Returns an array; [cmp.real, cmp.imag].
Complex(1, 2).rectangular #=> [1, 2]
1232 1233 1234 1235 1236 1237 |
# File 'complex.c', line 1232
static VALUE
nucomp_rect(VALUE self)
{
get_dat1(self);
return rb_assoc_new(dat->real, dat->imag);
}
|