Method: Complex#rect

Defined in:
complex.c

#rectArray #rectangularArray

Returns an array; [cmp.real, cmp.imag].

Complex(1, 2).rectangular  #=> [1, 2]

Overloads:

[View source]

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);
}