Ruby Complex Functions
EditRocket provides the following information on Complex functions in the Ruby source code builder.
abs() - "Absolute value (aka modulus): distance from the zero point on the complex plane."
abs2() - Square of the absolute value.
angle() - "Alias for #arg"
arg() - Argument (angle from (1,0) on the complex plane).
coerce(other) - Attempts to coerce other to a Complex number.
conj() - "Alias for #conjugate"
conjugate() - Complex conjugate (z + z.conjugate = 2 * z.real).
denominator() - FIXME
hash() - Returns a hash code for the complex number.
inspect() - Returns "Complex(real, image)".
new!(a, b=0) - Creates a Complex number a+bi.
new(a, b) -
numerator() - FIXME
polar(r, theta) - Creates a Complex number in terms of r (radius) and theta (angle).
polar(r, theta) - Creates a Complex number in terms of r (radius) and theta (angle).
to_s() - Standard string representation of the complex number.