class Complex

Provides methods for manipulating complex numbers

class attributes [NB. Highlighted attributes are static members]
function Complex() - The constructor of the Math.Complex class
function conjugate() - Determines the complex conjugate of a complex number
function add() - Adds two complex numbers
function sub() - Subtracts complex number b from complex number a
function mult() - Multiplies two complex numbers
function div() - Divides complex number a by complex number b
function modulus() - Calculates the modulus of this complex number object
function sqrt() - Determines the principal square root of a complex number
function copy() - Copies the contents of a complex variable
function toString() - Generates a string representation of this complex number

Functions

function Complex Click to go up to the list
The constructor of the Math.Complex class
Declaration:
    function Complex( number r, number i )
Description:
Creates a complex number object with the specified real and imaginary parts.
Parameters:
    Parameter #1: number r - The real part of the complex number
    Parameter #2: number i - The imaginary part of the complex number

function conjugate Click to go up to the list
Determines the complex conjugate of a complex number
Description:
Stores the complex conjugate of c into the calling object.
Parameters:
    Parameter #1: object c - the complex variable to determine the conjugate of

function add Click to go up to the list
Adds two complex numbers
Description:
Adds the complex numbers a and b and stores the result into the calling object.
Parameters:
    Parameter #1: object a - The first complex number
    Parameter #2: object b - The second complex number

function sub Click to go up to the list
Subtracts complex number b from complex number a
Description:
Subtracts complex number b from complex number a and stores the result into the calling object.
Parameters:
    Parameter #1: object a - The minuend
    Parameter #2: object b - The subtrahend

function mult Click to go up to the list
Multiplies two complex numbers
Description:
Multiplies the complex numbers a and b and stores the results into the calling object.
Parameters:
    Parameter #1: object a - The first complex number
    Parameter #2: object b - The second complex number

function div Click to go up to the list
Divides complex number a by complex number b
Description:
Divides the complex number a by the complex number b and stores the result in the calling object.
Parameters:
    Parameter #1: object a - The numerator
    Parameter #2: object b - The denominator

function modulus Click to go up to the list
Calculates the modulus of this complex number object
Returns:
    The modulus of the complex number as an ordinary number

function sqrt Click to go up to the list
Determines the principal square root of a complex number
Description:
Computes the principal square root of complex number a and stores the result in the calling object.
Parameters:
    Parameter #1: object a - The complex number to determine the square root of

function copy Click to go up to the list
Copies the contents of a complex variable
Description:
Copies complex number a into the calling object.
Parameters:
    Parameter #1: object a - The complex number to copy

function toString Click to go up to the list
Generates a string representation of this complex number
Returns:
    A string representation of this complex number

Automatically generated at 8:45pm, Wednesday 08 January 2003 by feritedoc.