Struct Complex

Complex structure

The complex number structure.

public struct Complex : IEquatable<Complex>

Constructors

NameDescription
Complex(Complex)Initializes a new instance of the Complex struct.
Complex(double, double)Initializes a new instance of the Complex struct.

Properties

NameDescription
Im { get; set; }Gets or sets the imaginary part.
Magnitude { get; }Gets the magnitude.
Phase { get; }Gets the phase.
Re { get; set; }Gets or sets the real part.
SquaredMagnitude { get; }Gets the squared magnitude.

Methods

NameDescription
static Add(Complex, Complex)Adds a and b.
static Add(Complex, double)Adds a and s.
static Cos(Complex)Gets Cos of a.
static Divide(Complex, Complex)Divides a by b.
static Divide(Complex, double)Divides a by s.
static Divide(double, Complex)Divides a by s.
static Exp(Complex)Raises e by a.
static Log(Complex)Gets log of a.
static Multiply(Complex, Complex)Multiplies a by b.
static Multiply(Complex, double)Multiplies a by s.
static Negate(Complex)Negates a.
static Parse(string)Parses the specified s into a Complex.
static Sin(Complex)Gets Sin of a.
static Sqrt(Complex)Gets square root of a.
static Subtract(Complex, Complex)Subtracts b from a.
static Subtract(Complex, double)Subtracts s from a.
static Subtract(double, Complex)Subtracts s from a.
static Tan(Complex)Gets Tan of a.
Clone()Clones this instance.
Equals(Complex)Determines whether the specified Object, is equal to this instance.
override Equals(object)Determines whether the specified Object, is equal to this instance.
override GetHashCode()Returns a hash code for this instance.
override ToString()Returns a String that represents this instance.
static Add(Complex, Complex, ref Complex)Adds a and b.
static Add(Complex, double, ref Complex)Adds a and s.
static ApproxEqual(Complex, Complex)Checks approximate equality.
static ApproxEqual(Complex, Complex, double)Checks approximate equality.
static Divide(Complex, Complex, ref Complex)Divides a by b.
static Divide(Complex, double, ref Complex)Divides a by s.
static Divide(double, Complex, ref Complex)Divides s by a.
static Multiply(Complex, Complex, ref Complex)Multiplies a by b.
static Multiply(Complex, double, ref Complex)Multiplies a by s.
static Subtract(Complex, Complex, ref Complex)Subtracts b from a.
static Subtract(Complex, double, ref Complex)Subtracts s from a.
static Subtract(double, Complex, ref Complex)Subtracts a from s.
static TryParse(string, out Complex)Tries to parse the specified s into a Complex.
operator +Implements the operator +. (3 operators)
operator /Implements the operator /. (3 operators)
operator ==Implements the operator ==.
explicit operatorPerforms an explicit conversion from Double to Complex. (2 operators)
operator !=Implements the operator !=.
operator *Implements the operator *. (3 operators)
operator -Implements the operator -. (4 operators)

Fields

NameDescription
static readonly II complex having Im equal to 1.
static readonly OneOne complex having Re and Im equal to 1.
static readonly ZeroZero complex.
static readonly SizeOfComplexThe size of complex.
static readonly SizeOfDoubleThe size of Double.

See Also