Core Help Root: Objects: Complex Number Library
$complex_lib contains functions for manipulating complex numbers. The complex number a + bi is represented as [a, b]
. Frobs may also be used to store complex number data in the format <$complex_lib, [a, b]
, 'do_frob>.
Methods
- .add(c1, c2)
- Returns the sum of two complex numbers.
- .sub(c1, c2)
- Returns the difference of two complex numbers.
- .conjugate(c)
- Returns the conjugate of a complex number.
- .mul(c1, c2)
- Returns the multiple of two complex numbers.
- .div(c1, c2)
- Returns the quotient of two complex numbers.
- .do_frob(receiver, method,
[args]
) - Handler for frobbed complex number operations.
- .to_string(c)
- Returns c as a string in the format "a + bi".
- .from_string(str)
- Returns a complex number from a string.
the Cold Dark