Compares two Complex objects.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public int CompareTo(
	Complex z
)
Visual Basic (Declaration)
Public Function CompareTo ( _
	z As Complex _
) As Integer
Visual C++
public:
int CompareTo(
	Complex z
)

Parameters

z
Type: Imsl.Math..::.Complex
A Complex to be compared.

Return Value

The value 0 if z is equal to this Complex; a value less than 0 if this Complex is less than z; and a value greater than 0 if this Complex is greater than z.

Remarks

A lexigraphical ordering is used. First the real parts are compared in the sense of Double.compareTo. If the real parts are unequal this is the return value. If the return parts are equal then the comparison of the imaginary parts is returned.

See Also