ComplexFloat Type

A single-precision complex number representation.

Constructors

Constructor Description

ComplexFloat(real, imaginary)

Full Usage: ComplexFloat(real, imaginary)

Parameters:
    real : float32 -
    imaginary : float32 -

Create a complex number from a real and an imaginary component

real : float32

imaginary : float32

ComplexFloat(c)

Full Usage: ComplexFloat(c)

Parameters:

Create a complex number based on an existing complex number

c : ComplexFloat

ComplexFloat(s)

Full Usage: ComplexFloat(s)

Parameters:
    s : string - The string to create the ComplexFloat from.

Created a ComplexFloat from the given string. The string can be in the following formats: n, ni, n +/- ni, n,n, n,ni, (n,n), or (n,ni), where n is a real number.

s : string

The string to create the ComplexFloat from.

FormatException if the n, is not a number.
ArgumentNullException if s, is null.

Instance members

Instance member Description

this.Clone

Full Usage: this.Clone

Returns: ComplexFloat

Clone the complex number

Returns: ComplexFloat

this.CompareTo

Full Usage: this.CompareTo

Parameters:
    o : obj -

Returns: int
Modifiers: abstract

Compare to other complex numbers or real numbers

o : obj

Returns: int

this.Equals

Full Usage: this.Equals

Parameters:
    obj : Complex - obj to compare present ComplexFloat to.

Returns: bool Returns true if the variable is the same as the ComplexFloat variable

Check if ComplexFloat variable is the same as another object

The obj parameter is converted into a ComplexFloat variable before comparing with the current ComplexFloat.

obj : Complex

obj to compare present ComplexFloat to.

Returns: bool

Returns true if the variable is the same as the ComplexFloat variable

this.Equals

Full Usage: this.Equals

Parameters:
    obj : ComplexFloat - obj to compare present ComplexFloat to.

Returns: bool Returns true if the variable is the same as the ComplexFloat variable

Check if ComplexFloat variable is the same as another object

The obj parameter is converted into a ComplexFloat variable before comparing with the current ComplexFloat.

obj : ComplexFloat

obj to compare present ComplexFloat to.

Returns: bool

Returns true if the variable is the same as the ComplexFloat variable

this.Equals

Full Usage: this.Equals

Parameters:
    obj : obj - obj to compare present ComplexFloat to.

Returns: bool Returns true if the variable is the same as the ComplexFloat variable
Modifiers: abstract

Check if ComplexFloat variable is the same as another object

The obj parameter is converted into a ComplexFloat variable before comparing with the current ComplexFloat.

obj : obj

obj to compare present ComplexFloat to.

Returns: bool

Returns true if the variable is the same as the ComplexFloat variable

this.GetArgument

Full Usage: this.GetArgument

Returns: float32

The argument (radians) of the complex number

Returns: float32

this.GetConjugate

Full Usage: this.GetConjugate

Returns: ComplexFloat

Get the conjugate of the complex number

Returns: ComplexFloat

this.GetHashCode

Full Usage: this.GetHashCode

Returns: int
Modifiers: abstract

Get the hash code of the complex number

Returns: int

this.GetModulus

Full Usage: this.GetModulus

Returns: float32

The modulus (length) of the complex number

Returns: float32

this.GetModulusSquared

Full Usage: this.GetModulusSquared

Returns: float32

The squared modulus (length^2) of the complex number

Returns: float32

this.Imag

Full Usage: this.Imag

The imaginary component of the complex number

this.IsInfinity

Full Usage: this.IsInfinity

Returns: bool True if either the real or imaginary components are infinite, false otherwise.

Tests whether the the complex number is infinite.

Returns: bool

True if either the real or imaginary components are infinite, false otherwise.

this.IsNaN

Full Usage: this.IsNaN

Returns: bool True if either the real or imaginary components are NaN, false otherwise.

Tests whether the the complex number is not a number.

Returns: bool

True if either the real or imaginary components are NaN, false otherwise.

this.Normalize

Full Usage: this.Normalize

Scale the complex number to 1.

this.Real

Full Usage: this.Real

The real component of the complex number

this.ToString

Full Usage: this.ToString

Returns: string The string representation of the value of this instance.
Modifiers: abstract

A string representation of this ComplexFloat.

Returns: string

The string representation of the value of this instance.

this.ToString

Full Usage: this.ToString

Parameters:
    format : string - A format specification.

Returns: string The string representation of the value of this instance as specified by format.

A string representation of this ComplexFloat.

format : string

A format specification.

Returns: string

The string representation of the value of this instance as specified by format.

this.ToString

Full Usage: this.ToString

Parameters:
    formatProvider : IFormatProvider - An IFormatProvider that supplies culture-specific formatting information.

Returns: string The string representation of the value of this instance as specified by provider.

A string representation of this ComplexFloat.

formatProvider : IFormatProvider

An IFormatProvider that supplies culture-specific formatting information.

Returns: string

The string representation of the value of this instance as specified by provider.

this.ToString

Full Usage: this.ToString

Parameters:
    format : string - A format specification.
    formatProvider : IFormatProvider - An IFormatProvider that supplies culture-specific formatting information.

Returns: string The string representation of the value of this instance as specified by format and provider.

A string representation of this ComplexFloat.

format : string

A format specification.

formatProvider : IFormatProvider

An IFormatProvider that supplies culture-specific formatting information.

Returns: string

The string representation of the value of this instance as specified by format and provider.

FormatException if the n, is not a number.
ArgumentNullException if s, is null.

Static members

Static member Description

a * f

Full Usage: a * f

Parameters:
Returns: ComplexFloat

Multiply a complex number by a real

a : ComplexFloat

f : float32

Returns: ComplexFloat

f * a

Full Usage: f * a

Parameters:
Returns: ComplexFloat

Multiply a real by a complex number

f : float32

a : ComplexFloat

Returns: ComplexFloat

a * b

Full Usage: a * b

Parameters:
Returns: ComplexFloat

Multiply two complex numbers together

a : ComplexFloat

b : ComplexFloat

Returns: ComplexFloat

a + f

Full Usage: a + f

Parameters:
Returns: ComplexFloat

Add a complex number to a real

a : ComplexFloat

f : float32

Returns: ComplexFloat

f + a

Full Usage: f + a

Parameters:
Returns: ComplexFloat

Add a real to a complex number

f : float32

a : ComplexFloat

Returns: ComplexFloat

a + b

Full Usage: a + b

Parameters:
Returns: ComplexFloat

Add to complex numbers

a : ComplexFloat

b : ComplexFloat

Returns: ComplexFloat

a - f

Full Usage: a - f

Parameters:
Returns: ComplexFloat

Subtract a real from a complex number

a : ComplexFloat

f : float32

Returns: ComplexFloat

f - a

Full Usage: f - a

Parameters:
Returns: ComplexFloat

Subtract a complex number from a real

f : float32

a : ComplexFloat

Returns: ComplexFloat

a - b

Full Usage: a - b

Parameters:
Returns: ComplexFloat

Subtract two complex numbers

a : ComplexFloat

b : ComplexFloat

Returns: ComplexFloat

a / f

Full Usage: a / f

Parameters:
Returns: ComplexFloat

Divide a complex number by a real number

a : ComplexFloat

f : float32

Returns: ComplexFloat

a / b

Full Usage: a / b

Parameters:
Returns: ComplexFloat

Divide a complex number by a complex number

a : ComplexFloat

b : ComplexFloat

Returns: ComplexFloat

a <> b

Full Usage: a <> b

Parameters:
Returns: bool

Are these two complex numbers different?

a : ComplexFloat

b : ComplexFloat

Returns: bool

a = b

Full Usage: a = b

Parameters:
Returns: bool

Are these two complex numbers equivalent?

a : ComplexFloat

b : ComplexFloat

Returns: bool

~+a

Full Usage: ~+a

Parameters:
Returns: ComplexFloat

This operator doesn't do much. :-)

a : ComplexFloat

Returns: ComplexFloat

~-a

Full Usage: ~-a

Parameters:
Returns: ComplexFloat

Negate the complex number

a : ComplexFloat

Returns: ComplexFloat

ComplexFloat.FromModulusArgument(modulus, argument)

Full Usage: ComplexFloat.FromModulusArgument(modulus, argument)

Parameters:
    modulus : float32 -
    argument : float32 -

Returns: ComplexFloat

Create a complex number from a modulus (length) and an argument (radian)

modulus : float32

argument : float32

Returns: ComplexFloat

ComplexFloat.FromRealImaginary(real, imaginary)

Full Usage: ComplexFloat.FromRealImaginary(real, imaginary)

Parameters:
    real : float32 -
    imaginary : float32 -

Returns: ComplexFloat

Create a complex number from a real and an imaginary component

real : float32

imaginary : float32

Returns: ComplexFloat

ComplexFloat.I

Full Usage: ComplexFloat.I

Returns: ComplexFloat

Represents the result of sqrt( -1 )

Returns: ComplexFloat

ComplexFloat.IsEqual(a, b, tolerance)

Full Usage: ComplexFloat.IsEqual(a, b, tolerance)

Parameters:
Returns: bool

Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent.

a : ComplexFloat

b : ComplexFloat

tolerance : float32

Returns: bool

ComplexFloat.MaxValue

Full Usage: ComplexFloat.MaxValue

Returns: ComplexFloat

Represents the largest possible value of ComplexFloat.

Returns: ComplexFloat

ComplexFloat.MinValue

Full Usage: ComplexFloat.MinValue

Returns: ComplexFloat

Represents the smallest possible value of ComplexFloat.

Returns: ComplexFloat

ComplexFloat.One

Full Usage: ComplexFloat.One

Returns: ComplexFloat

Represents one

Returns: ComplexFloat

ComplexFloat.Parse(s)

Full Usage: ComplexFloat.Parse(s)

Parameters:
    s : string - the string to parse.

Returns: ComplexFloat

Creates a ComplexFloat based on a string. The string can be in the following formats: n, ni, n +/- ni, n,n, n,ni, (n,n), or (n,ni), where n is a real number.

s : string

the string to parse.

Returns: ComplexFloat

ComplexFloat.Zero

Full Usage: ComplexFloat.Zero

Returns: ComplexFloat

Represents zero

Returns: ComplexFloat

op_Explicitc

Full Usage: op_Explicitc

Parameters:
Returns: ComplexFloat

c : Complex
Returns: ComplexFloat

op_Explicitc

Full Usage: op_Explicitc

Parameters:
Returns: float32

c : ComplexFloat
Returns: float32

op_Implicitf

Full Usage: op_Implicitf

Parameters:
    f : float32

Returns: ComplexFloat

f : float32
Returns: ComplexFloat