Averest


cplx Type

Complex numbers cplx(re,im) are constructed by two floating point numbers which are the real and imaginary part of the complex number.

Constructors

Constructor Description

cplx(re, im)

Full Usage: cplx(re, im)

Parameters:
    re : double
    im : double

Returns: cplx

re : double
im : double
Returns: cplx

Instance members

Instance member Description

this.im

Full Usage: this.im

Returns: double

Returns: double

this.re

Full Usage: this.re

Returns: double

Returns: double

Static members

Static member Description

c1 * c2

Full Usage: c1 * c2

Parameters:
Returns: cplx

multiplication of complex numbers

c1 : cplx
c2 : cplx
Returns: cplx

c1 + c2

Full Usage: c1 + c2

Parameters:
Returns: cplx

addition of complex numbers

c1 : cplx
c2 : cplx
Returns: cplx

c1 - c2

Full Usage: c1 - c2

Parameters:
Returns: cplx

subtraction of complex numbers

c1 : cplx
c2 : cplx
Returns: cplx

c1 / c2

Full Usage: c1 / c2

Parameters:
Returns: cplx

division of complex numbers

c1 : cplx
c2 : cplx
Returns: cplx

cplx.abs c

Full Usage: cplx.abs c

Parameters:
Returns: double

absolute value

c : cplx
Returns: double

cplx.conjugate c

Full Usage: cplx.conjugate c

Parameters:
Returns: cplx

conjugate of a complex number

c : cplx
Returns: cplx

cplx.isZero c

Full Usage: cplx.isZero c

Parameters:
Returns: bool

checking whether a number is zero

c : cplx
Returns: bool

cplx.reciprocal c

Full Usage: cplx.reciprocal c

Parameters:
Returns: cplx

multiplicative inverse of a complex number

c : cplx
Returns: cplx

cplx.sqrt c

Full Usage: cplx.sqrt c

Parameters:
Returns: cplx

square root (note that its negative is also a root)

c : cplx
Returns: cplx