Parameters
float
real
The value for the real component.
float
imaginary
The value for the imaginary component.
Type Complex32
Namespace MathNet.Numerics
Parent ValueType
Interfaces IFormattable, IEquatable<Complex32>
The class
Complex32
provides all elementary operations on complex numbers. All the operators+
,-
,*
,/
,==
,!=
are defined in the canonical way. Additional complex trigonometric functions are also provided. Note that theComplex32
structures has two special constant values NaN and PositiveInfinity.
Complex32 x = new Complex32(1f,2f); Complex32 y = Complex32.FromPolarCoordinates(1f, Math.Pi); Complex32 z = (x + y) / (x - y);
For mathematical details about complex numbers, please have a look at the
float
realThe value for the real component.
float
imaginaryThe value for the imaginary component.
double
The absolute value of value.
float
magnitudeThe magnitude, which is the distance from the origin (the intersection of the x-axis and the y-axis) to the number.
float
phaseThe phase, which is the angle from the line to the horizontal axis, measured in radians.
string
valuethe string to parse.
IFormatProvider
formatProviderAn IFormatProvider that supplies culture-specific formatting information.
Complex32
valueA complex number to be raised to a power.
float
powerA single-precision floating-point number that specifies a power.
Complex32
(Base 10).
Complex32
.
object
objThe complex number to compare to with.
bool
Returns true
if the two objects are the same object, or if their corresponding
real and imaginary components are equal, false
otherwise.
bool
Returns true
if the two objects are the same object, or if their corresponding
real and imaginary components are equal, false
otherwise.
Complex32
(exp(x), E^x).
The hash code is calculated as System.Math.Exp(ComplexMath.Absolute(complexNumber)).
int
The hash code of the complex number.
Complex32
is the imaginary unit.
bool
true
if this instance is ImaginaryOne; otherwise, false
.
Complex32
evaluates to an
infinite value. True if it either evaluates to a complex infinity or to a directed infinity.
bool
true
if this instance is infinite; otherwise, false
.
Complex32
evaluates
to a value that is not a number.
Complex32
is one.
bool
true
if this instance is one; otherwise, false
.
Complex32
is real.
bool
true
if this instance is a real number; otherwise, false
.
Complex32
is real and not negative, that is >= 0.
bool
true
if this instance is real nonnegative number; otherwise, false
.
Complex32
is zero.
bool
true
if this instance is zero; otherwise, false
.
Complex32
with custom base.
Complex32
(Base E).
Complex32
Complex32
Complex32
.
Complex32
to a Complex.
string
formatA standard or custom numeric format string.
IFormatProvider
providerAn object that supplies culture-specific formatting information.
string
The string representation of the current instance in Cartesian form, as specified by format and provider.
IFormatProvider
providerAn object that supplies culture-specific formatting information.
string
The string representation of the current instance in Cartesian form, as specified by provider.
string
formatA standard or custom numeric format string.
string
The string representation of the current instance in Cartesian form.
string
The string representation of the current instance in Cartesian form.
Value:
Assuming that magnitude of (inf,a) and (a,inf) and (inf,inf) is inf and (NaN,a), (a,NaN) and (NaN,NaN) is NaN
Complex32
.
Phase always returns a value bigger than negative Pi and
smaller or equal to Pi. If this Complex32
is zero, the Complex32
is assumed to be positive real with an argument of zero.
Value: