Complex<T> Constructor

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Constructs a complex number

Overload List

Complex<T>(T) Constructs a complex number from a real number.
Complex<T>(T, T) Constructs a complex number from its real and imaginary parts.
Complex<T>(T, T, Boolean) Constructs a complex number from rectangular or polar elements.
Obsolete.

Complex<T>(T)

Constructs a complex number from a real number.
C#
public Complex(
	T realPart
)

Parameters

realPart  T
The real part of the complex number.

Remarks

The imaginary part of the complex number is set to zero.

Complex<T>(T, T)

Constructs a complex number from its real and imaginary parts.
C#
public Complex(
	T realPart,
	T imaginaryPart
)

Parameters

realPart  T
The real part.
imaginaryPart  T
The imaginary part.

Complex<T>(T, T, Boolean)

Note: This API is now obsolete.
Constructs a complex number from rectangular or polar elements.
C#
[ObsoleteAttribute("Please use the FromPolar method instead.")]
public Complex(
	T a,
	T b,
	bool polar
)

Parameters

a  T
If polar is true, specifies the modulus of the complex number. If polar is false, specifies the real part.
b  T
If polar is true, specifies the argument of the complex number. If polar is false, specifies the imaginary part.
polar  Boolean
Indicates whether the parameters a and b are for the polar (polar= true or rectangular (polar= false) representation.

Remarks

A complex number can be defined in two ways.

The standard way is to specify its real and imaginary parts. If polar is false, the a and b parameters are interpreted respectively as the real and imaginary elements of the complex number.

A complex number can also be specified in polar form. If polar is true, the a parameter is taken to be the modulus, and the b parameter is taken to be the argument of the complex number. The corresponding complex number is equal to

a cos b  + ia sin b.

Note: This constructor has been deprecated. Please use the FromPolar(T, T) method instead.

See Also