Table of Contents

Struct NumberValue

Namespace
xFunc.Maths.Expressions
Assembly
xFunc.Maths.dll

Represents the number value.

public readonly struct NumberValue : IEquatable<NumberValue>, IEquatable<double>, IComparable<NumberValue>, IComparable<double>, IComparable
Implements
Inherited Members

Constructors

NumberValue(double)

Initializes a new instance of the NumberValue struct.

public NumberValue(double value)

Parameters

value double

The value.

Fields

Half

1 / 2 = 0.5.

public static readonly NumberValue Half

Field Value

NumberValue

NaN

NaN.

public static readonly NumberValue NaN

Field Value

NumberValue

NegativeInfinity

NegativeInfinity.

public static readonly NumberValue NegativeInfinity

Field Value

NumberValue

One

public static readonly NumberValue One

Field Value

NumberValue

PositiveInfinity

PositiveInfinity.

public static readonly NumberValue PositiveInfinity

Field Value

NumberValue

Sqrt2

sqrt(2).

public static readonly NumberValue Sqrt2

Field Value

NumberValue

Sqrt2By2

sqrt(2) / 2.

public static readonly NumberValue Sqrt2By2

Field Value

NumberValue

Sqrt3

sqrt(3).

public static readonly NumberValue Sqrt3

Field Value

NumberValue

Sqrt3By2

sqrt(3) / 2.

public static readonly NumberValue Sqrt3By2

Field Value

NumberValue

Sqrt3By3

sqrt(3) / 3.

public static readonly NumberValue Sqrt3By3

Field Value

NumberValue

Sqrt3By3By2

2 * sqrt(3) / 3.

public static readonly NumberValue Sqrt3By3By2

Field Value

NumberValue

Two

public static readonly NumberValue Two

Field Value

NumberValue

Zero

public static readonly NumberValue Zero

Field Value

NumberValue

Properties

IsInfinity

Gets a value indicating whether the current number evaluates to infinity.

public bool IsInfinity { get; }

Property Value

bool

IsNaN

Gets a value indicating whether the current value is not a number (NaN).

public bool IsNaN { get; }

Property Value

bool

IsNegativeInfinity

Gets a value indicating whether the current number evaluates to negative infinity.

public bool IsNegativeInfinity { get; }

Property Value

bool

IsPositiveInfinity

Gets a value indicating whether the current number evaluates to positive infinity.

public bool IsPositiveInfinity { get; }

Property Value

bool

Number

Gets a value.

public double Number { get; }

Property Value

double

Sign

Gets a sign of number.

public double Sign { get; }

Property Value

double

Methods

Abs(NumberValue)

Returns the absolute value of a double-precision floating-point number.

public static NumberValue Abs(NumberValue numberValue)

Parameters

numberValue NumberValue

A number that is greater than or equal to MinValue, but less than or equal to MaxValue.

Returns

NumberValue

A double-precision floating-point number, x, such that 0 ≤ x ≤ MaxValue.

Ceiling(NumberValue)

Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.

public static NumberValue Ceiling(NumberValue numberValue)

Parameters

numberValue NumberValue

A double-precision floating-point number.

Returns

NumberValue

The smallest integral value that is greater than or equal to numberValue. If numberValue is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned. Note that this method returns a Double instead of an integral type.

CompareTo(double)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(double other)

Parameters

other double

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

CompareTo(object?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

CompareTo(NumberValue)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(NumberValue other)

Parameters

other NumberValue

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Deconstruct(out double)

Deconstructs NumberValue to double.

public void Deconstruct(out double number)

Parameters

number double

The value of current number value.

Equals(double)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(double other)

Parameters

other double

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(NumberValue)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NumberValue other)

Parameters

other NumberValue

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Exp(NumberValue)

Returns e raised to the specified power.

public static NumberValue Exp(NumberValue numberValue)

Parameters

numberValue NumberValue

A number specifying a power.

Returns

NumberValue

The number e raised to the power numberValue. If numberValue equals NaN or PositiveInfinity, that value is returned. If numberValue equals NegativeInfinity, 0 is returned.

Factorial(NumberValue)

Returns a factorial of specified number.

public static NumberValue Factorial(NumberValue numberValue)

Parameters

numberValue NumberValue

A specified number.

Returns

NumberValue

The factorial.

Floor(NumberValue)

Returns the largest integral value less than or equal to the specified double-precision floating-point number.

public static NumberValue Floor(NumberValue numberValue)

Parameters

numberValue NumberValue

A double-precision floating-point number.

Returns

NumberValue

The largest integral value less than or equal to numberValue. If numberValue is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned.

Frac(NumberValue)

Returns the fractional part of the number.

public static NumberValue Frac(NumberValue numberValue)

Parameters

numberValue NumberValue

The number value.

Returns

NumberValue

The fractional part.

GCD(NumberValue, NumberValue)

Returns the polynomial greatest common divisor.

public static NumberValue GCD(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first numbers.

right NumberValue

The second numbers.

Returns

NumberValue

The greatest common divisor.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

LCM(NumberValue, NumberValue)

Computes the polynomial greatest common divisor.

public static NumberValue LCM(NumberValue a, NumberValue b)

Parameters

a NumberValue

The first numbers.

b NumberValue

The second numbers.

Returns

NumberValue

The least common multiple.

Lb(NumberValue)

Returns the base 2 logarithm of a specified number.

public static NumberValue Lb(NumberValue numberValue)

Parameters

numberValue NumberValue

A number whose logarithm is to be found.

Returns

NumberValue

The binary logarithm.

LeftShift(NumberValue, NumberValue)

Shifts left by number of bits from right.

public static NumberValue LeftShift(NumberValue left, NumberValue right)

Parameters

left NumberValue

The left operand.

right NumberValue

The right operand.

Returns

NumberValue

The result of '<<' operation.

Exceptions

InvalidOperationException

left or right is not an integer.

Lg(NumberValue)

Returns the base 10 logarithm of a specified number.

public static NumberValue Lg(NumberValue numberValue)

Parameters

numberValue NumberValue

A number whose logarithm is to be found.

Returns

NumberValue

The base 10 logarithm.

Ln(NumberValue)

Returns the natural (base e) logarithm of a specified number.

public static NumberValue Ln(NumberValue numberValue)

Parameters

numberValue NumberValue

The number whose logarithm is to be found.

Returns

NumberValue

The natural (base e) logarithm.

Log(Complex, NumberValue)

Returns the logarithm of a specified number in a specified base.

public static Complex Log(Complex number, NumberValue @base)

Parameters

number Complex

The number whose logarithm is to be found.

base NumberValue

The base of the logarithm.

Returns

Complex

The logarithm.

Log(NumberValue, NumberValue)

Returns the logarithm of a specified number in a specified base.

public static NumberValue Log(NumberValue number, NumberValue @base)

Parameters

number NumberValue

The number whose logarithm is to be found.

base NumberValue

The base of the logarithm.

Returns

NumberValue

The logarithm.

Pow(Complex, NumberValue)

Returns a specified number raised to the specified power.

public static Complex Pow(Complex number, NumberValue power)

Parameters

number Complex

A double-precision floating-point number to be raised to a power.

power NumberValue

A double-precision floating-point number that specifies a power.

Returns

Complex

The number raised to the power.

Pow(NumberValue, NumberValue)

Returns a specified number raised to the specified power.

public static object Pow(NumberValue number, NumberValue power)

Parameters

number NumberValue

A double-precision floating-point number to be raised to a power.

power NumberValue

A double-precision floating-point number that specifies a power.

Returns

object

The number raised to the power.

RightShift(NumberValue, NumberValue)

Shifts left by number of bits from right.

public static NumberValue RightShift(NumberValue left, NumberValue right)

Parameters

left NumberValue

The left operand.

right NumberValue

The right operand.

Returns

NumberValue

The result of '>>' operation.

Exceptions

InvalidOperationException

left or right is not an integer.

Round(NumberValue)

Rounds a double-precision floating-point value to a specified number of fractional digits, and uses the specified rounding convention for midpoint values.

public static NumberValue Round(NumberValue number)

Parameters

number NumberValue

A double-precision floating-point number to be rounded.

Returns

NumberValue

The integer nearest number.

Round(NumberValue, NumberValue)

Rounds a double-precision floating-point value to a specified number of fractional digits, and uses the specified rounding convention for midpoint values.

public static NumberValue Round(NumberValue number, NumberValue digits)

Parameters

number NumberValue

A double-precision floating-point number to be rounded.

digits NumberValue

The number of fractional digits in the return value.

Returns

NumberValue

The number nearest to number that has a number of fractional digits equal to digits. If value has fewer fractional digits than digits, number is returned unchanged.

Exceptions

InvalidOperationException

The value is not an integer.

Sqrt(NumberValue)

Returns the square root of a specified number.

public static object Sqrt(NumberValue numberValue)

Parameters

numberValue NumberValue

The number whose square root is to be found.

Returns

object

The square root.

ToBin(NumberValue)

Converts numberValue to the binary number.

public static string ToBin(NumberValue numberValue)

Parameters

numberValue NumberValue

The number.

Returns

string

String that contains the number in the new numeral system.

Exceptions

ArgumentException

Only the integer value is supported.

ToHex(NumberValue)

Converts numberValue to the hexadecimal number.

public static string ToHex(NumberValue numberValue)

Parameters

numberValue NumberValue

The number.

Returns

string

String that contains the number in the new numeral system.

Exceptions

ArgumentException

Only the integer value is supported.

ToOct(NumberValue)

Converts numberValue to the octal number.

public static string ToOct(NumberValue numberValue)

Parameters

numberValue NumberValue

The number.

Returns

string

String that contains the number in the new numeral system.

Exceptions

ArgumentException

Only the integer value is supported.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Truncate(NumberValue)

Calculates the integral part of a specified double-precision floating-point number.

public static NumberValue Truncate(NumberValue number)

Parameters

number NumberValue

A number to truncate.

Returns

NumberValue

The integral part.

Operators

operator +(double, NumberValue)

Adds double and NumberValue.

public static NumberValue operator +(double left, NumberValue right)

Parameters

left double

The first object to add.

right NumberValue

The second object to add.

Returns

NumberValue

An object that is the sum of left and right.

operator +(Complex, NumberValue)

Adds Complex and NumberValue.

public static Complex operator +(Complex left, NumberValue right)

Parameters

left Complex

The first object to add.

right NumberValue

The second object to add.

Returns

Complex

An object that is the sum of left and right.

operator +(NumberValue, double)

Adds NumberValue and double.

public static NumberValue operator +(NumberValue left, double right)

Parameters

left NumberValue

The first object to add.

right double

The second object to add.

Returns

NumberValue

An object that is the sum of left and right.

operator +(NumberValue, Complex)

Adds NumberValue and Complex.

public static Complex operator +(NumberValue left, Complex right)

Parameters

left NumberValue

The first object to add.

right Complex

The second object to add.

Returns

Complex

An object that is the sum of left and right.

operator +(NumberValue, NumberValue)

Adds two objects of NumberValue.

public static NumberValue operator +(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to add.

right NumberValue

The second object to add.

Returns

NumberValue

An object that is the sum of left and right.

operator +(NumberValue, AngleValue)

public static AngleValue operator +(NumberValue left, AngleValue right)

Parameters

left NumberValue

The first object to add.

right AngleValue

The second object to add.

Returns

AngleValue

An object that is the sum of left and right.

operator +(NumberValue, AreaValue)

public static AreaValue operator +(NumberValue left, AreaValue right)

Parameters

left NumberValue

The first object to add.

right AreaValue

The second object to add.

Returns

AreaValue

An object that is the sum of left and right.

operator +(NumberValue, LengthValue)

public static LengthValue operator +(NumberValue left, LengthValue right)

Parameters

left NumberValue

The first object to add.

right LengthValue

The second object to add.

Returns

LengthValue

An object that is the sum of left and right.

operator +(NumberValue, MassValue)

public static MassValue operator +(NumberValue left, MassValue right)

Parameters

left NumberValue

The first object to add.

right MassValue

The second object to add.

Returns

MassValue

An object that is the sum of left and right.

operator +(NumberValue, PowerValue)

public static PowerValue operator +(NumberValue left, PowerValue right)

Parameters

left NumberValue

The first object to add.

right PowerValue

The second object to add.

Returns

PowerValue

An object that is the sum of left and right.

operator +(NumberValue, TemperatureValue)

public static TemperatureValue operator +(NumberValue left, TemperatureValue right)

Parameters

left NumberValue

The first object to add.

right TemperatureValue

The second object to add.

Returns

TemperatureValue

An object that is the sum of left and right.

operator +(NumberValue, TimeValue)

public static TimeValue operator +(NumberValue left, TimeValue right)

Parameters

left NumberValue

The first object to add.

right TimeValue

The second object to add.

Returns

TimeValue

An object that is the sum of left and right.

operator +(NumberValue, VolumeValue)

public static VolumeValue operator +(NumberValue left, VolumeValue right)

Parameters

left NumberValue

The first object to add.

right VolumeValue

The second object to add.

Returns

VolumeValue

An object that is the sum of left and right.

operator +(AngleValue, NumberValue)

public static AngleValue operator +(AngleValue left, NumberValue right)

Parameters

left AngleValue

The first object to add.

right NumberValue

The second object to add.

Returns

AngleValue

An object that is the sum of left and right.

operator +(AreaValue, NumberValue)

public static AreaValue operator +(AreaValue left, NumberValue right)

Parameters

left AreaValue

The first object to add.

right NumberValue

The second object to add.

Returns

AreaValue

An object that is the sum of left and right.

operator +(LengthValue, NumberValue)

public static LengthValue operator +(LengthValue left, NumberValue right)

Parameters

left LengthValue

The first object to add.

right NumberValue

The second object to add.

Returns

LengthValue

An object that is the sum of left and right.

operator +(MassValue, NumberValue)

public static MassValue operator +(MassValue left, NumberValue right)

Parameters

left MassValue

The first object to add.

right NumberValue

The second object to add.

Returns

MassValue

An object that is the sum of left and right.

operator +(PowerValue, NumberValue)

public static PowerValue operator +(PowerValue left, NumberValue right)

Parameters

left PowerValue

The first object to add.

right NumberValue

The second object to add.

Returns

PowerValue

An object that is the sum of left and right.

operator +(TemperatureValue, NumberValue)

public static TemperatureValue operator +(TemperatureValue left, NumberValue right)

Parameters

left TemperatureValue

The first object to add.

right NumberValue

The second object to add.

Returns

TemperatureValue

An object that is the sum of left and right.

operator +(TimeValue, NumberValue)

public static TimeValue operator +(TimeValue left, NumberValue right)

Parameters

left TimeValue

The first object to add.

right NumberValue

The second object to add.

Returns

TimeValue

An object that is the sum of left and right.

operator +(VolumeValue, NumberValue)

public static VolumeValue operator +(VolumeValue left, NumberValue right)

Parameters

left VolumeValue

The first object to add.

right NumberValue

The second object to add.

Returns

VolumeValue

An object that is the sum of left and right.

operator &(NumberValue, NumberValue)

Calculates AND operation between two double values.

public static NumberValue operator &(NumberValue left, NumberValue right)

Parameters

left NumberValue

The left operand.

right NumberValue

The right operand.

Returns

NumberValue

The result of AND operation.

Exceptions

InvalidOperationException

left or right is not an integer.

operator |(NumberValue, NumberValue)

Calculates OR operation between two double values.

public static NumberValue operator |(NumberValue left, NumberValue right)

Parameters

left NumberValue

The left operand.

right NumberValue

The right operand.

Returns

NumberValue

The result of OR operation.

Exceptions

InvalidOperationException

left or right is not an integer.

operator /(double, NumberValue)

Divides double and NumberValue.

public static NumberValue operator /(double left, NumberValue right)

Parameters

left double

The first object to divide.

right NumberValue

The second object to divide.

Returns

NumberValue

An object that is the fraction of left and right.

operator /(Complex, NumberValue)

Divides Complex by NumberValue.

public static Complex operator /(Complex left, NumberValue right)

Parameters

left Complex

The first object to divide.

right NumberValue

The second object to divide.

Returns

Complex

An object that is the fraction of left and right.

operator /(NumberValue, double)

Divides NumberValue and double.

public static NumberValue operator /(NumberValue left, double right)

Parameters

left NumberValue

The first object to divide.

right double

The second object to divide.

Returns

NumberValue

An object that is the fraction of left and right.

operator /(NumberValue, Complex)

Divides NumberValue by Complex.

public static Complex operator /(NumberValue left, Complex right)

Parameters

left NumberValue

The first object to divide.

right Complex

The second object to divide.

Returns

Complex

An object that is the fraction of left and right.

operator /(NumberValue, NumberValue)

Divides two objects of NumberValue.

public static NumberValue operator /(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

NumberValue

An object that is the fraction of left and right.

operator /(AngleValue, NumberValue)

Divides AngleValue by NumberValue.

public static AngleValue operator /(AngleValue left, NumberValue right)

Parameters

left AngleValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

AngleValue

An object that is the fraction of left and right.

operator /(AreaValue, NumberValue)

Divides AreaValue by NumberValue.

public static AreaValue operator /(AreaValue left, NumberValue right)

Parameters

left AreaValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

AreaValue

An object that is the fraction of left and right.

operator /(LengthValue, NumberValue)

public static LengthValue operator /(LengthValue left, NumberValue right)

Parameters

left LengthValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

LengthValue

An object that is the fraction of left and right.

operator /(MassValue, NumberValue)

Divides MassValue by NumberValue.

public static MassValue operator /(MassValue left, NumberValue right)

Parameters

left MassValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

MassValue

An object that is the fraction of left and right.

operator /(PowerValue, NumberValue)

Divides PowerValue by NumberValue.

public static PowerValue operator /(PowerValue left, NumberValue right)

Parameters

left PowerValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

PowerValue

An object that is the fraction of left and right.

operator /(TemperatureValue, NumberValue)

public static TemperatureValue operator /(TemperatureValue left, NumberValue right)

Parameters

left TemperatureValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

TemperatureValue

An object that is the fraction of left and right.

operator /(TimeValue, NumberValue)

Divides TimeValue by NumberValue.

public static TimeValue operator /(TimeValue left, NumberValue right)

Parameters

left TimeValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

TimeValue

An object that is the fraction of left and right.

operator /(VolumeValue, NumberValue)

public static VolumeValue operator /(VolumeValue left, NumberValue right)

Parameters

left VolumeValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

VolumeValue

An object that is the fraction of left and right.

operator ==(double, NumberValue)

Determines whether two specified instances are equal.

public static bool operator ==(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if left is equal to right; otherwise, false.

operator ==(NumberValue, double)

Determines whether two specified instances are equal.

public static bool operator ==(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if left is equal to right; otherwise, false.

operator ==(NumberValue, NumberValue)

Determines whether two specified instances of NumberValue are equal.

public static bool operator ==(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if left is equal to right; otherwise, false.

operator ^(NumberValue, NumberValue)

Calculates XOR operation between two double values.

public static NumberValue operator ^(NumberValue left, NumberValue right)

Parameters

left NumberValue

The left operand.

right NumberValue

The right operand.

Returns

NumberValue

The result of XOR operation.

Exceptions

InvalidOperationException

left or right is not an integer.

operator >(double, NumberValue)

Indicates whether left parameter is greater than the right parameter.

public static bool operator >(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is greater than the right parameter; otherwise, false.

operator >(NumberValue, double)

Indicates whether left parameter is greater than the right parameter.

public static bool operator >(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if the left parameter is greater than the right parameter; otherwise, false.

operator >(NumberValue, NumberValue)

Indicates whether left parameter is greater than the right parameter.

public static bool operator >(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is greater than the right parameter; otherwise, false.

operator >=(double, NumberValue)

Indicates whether left parameter is greater than or equal to the right parameter.

public static bool operator >=(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is greater than or equal to the right parameter; otherwise, false.

operator >=(NumberValue, double)

Indicates whether left parameter is greater than or equal to the right parameter.

public static bool operator >=(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if the left parameter is greater than or equal to the right parameter; otherwise, false.

operator >=(NumberValue, NumberValue)

Indicates whether left parameter is greater than or equal to the right parameter.

public static bool operator >=(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is greater than or equal to the right parameter; otherwise, false.

operator !=(double, NumberValue)

Determines whether two specified instances are not equal.

public static bool operator !=(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if left is not equal to right; otherwise, false.

operator !=(NumberValue, double)

Determines whether two specified instances are not equal.

public static bool operator !=(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if left is not equal to right; otherwise, false.

operator !=(NumberValue, NumberValue)

Determines whether two specified instances of NumberValue are not equal.

public static bool operator !=(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if left is not equal to right; otherwise, false.

operator <(double, NumberValue)

Indicates whether left parameter is less than the right parameter.

public static bool operator <(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is less than the right parameter; otherwise, false.

operator <(NumberValue, double)

Indicates whether left parameter is less than the right parameter.

public static bool operator <(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if the left parameter is less than the right parameter; otherwise, false.

operator <(NumberValue, NumberValue)

Indicates whether left parameter is less than the right parameter.

public static bool operator <(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is less than the right parameter; otherwise, false.

operator <=(double, NumberValue)

Indicates whether left parameter is less than or equal to the right parameter.

public static bool operator <=(double left, NumberValue right)

Parameters

left double

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is less than or equal to the right parameter; otherwise, false.

operator <=(NumberValue, double)

Indicates whether left parameter is less than or equal to the right parameter.

public static bool operator <=(NumberValue left, double right)

Parameters

left NumberValue

The first object to compare.

right double

The second object to compare.

Returns

bool

true if the left parameter is less than or equal to the right parameter; otherwise, false.

operator <=(NumberValue, NumberValue)

Indicates whether left parameter is less than or equal to the right parameter.

public static bool operator <=(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to compare.

right NumberValue

The second object to compare.

Returns

bool

true if the left parameter is less than or equal to the right parameter; otherwise, false.

operator %(NumberValue, NumberValue)

Returns the remainder of a division.

public static NumberValue operator %(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to divide.

right NumberValue

The second object to divide.

Returns

NumberValue

The remainder of a division.

operator *(double, NumberValue)

Multiplies double and NumberValue.

public static NumberValue operator *(double left, NumberValue right)

Parameters

left double

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

NumberValue

An object that is the product of left and right.

operator *(Complex, NumberValue)

Multiplies Complex and NumberValue.

public static Complex operator *(Complex left, NumberValue right)

Parameters

left Complex

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

Complex

An object that is the product of left and right.

operator *(NumberValue, double)

Multiplies NumberValue and double.

public static NumberValue operator *(NumberValue left, double right)

Parameters

left NumberValue

The first object to multiply.

right double

The second object to multiply.

Returns

NumberValue

An object that is the product of left and right.

operator *(NumberValue, Complex)

Multiplies NumberValue and Complex.

public static Complex operator *(NumberValue left, Complex right)

Parameters

left NumberValue

The first object to multiply.

right Complex

The second object to multiply.

Returns

Complex

An object that is the product of left and right.

operator *(NumberValue, NumberValue)

Multiplies two objects of NumberValue.

public static NumberValue operator *(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

NumberValue

An object that is the product of left and right.

operator *(NumberValue, AngleValue)

Multiplies NumberValue and AngleValue.

public static AngleValue operator *(NumberValue left, AngleValue right)

Parameters

left NumberValue

The first object to multiply.

right AngleValue

The second object to multiply.

Returns

AngleValue

An object that is the product of left and right.

operator *(NumberValue, AreaValue)

Multiplies NumberValue and AreaValue.

public static AreaValue operator *(NumberValue left, AreaValue right)

Parameters

left NumberValue

The first object to multiply.

right AreaValue

The second object to multiply.

Returns

AreaValue

An object that is the product of left and right.

operator *(NumberValue, LengthValue)

Multiplies NumberValue and LengthValue.

public static LengthValue operator *(NumberValue left, LengthValue right)

Parameters

left NumberValue

The first object to multiply.

right LengthValue

The second object to multiply.

Returns

LengthValue

An object that is the product of left and right.

operator *(NumberValue, MassValue)

Multiplies NumberValue and MassValue.

public static MassValue operator *(NumberValue left, MassValue right)

Parameters

left NumberValue

The first object to multiply.

right MassValue

The second object to multiply.

Returns

MassValue

An object that is the product of left and right.

operator *(NumberValue, PowerValue)

Multiplies NumberValue and PowerValue.

public static PowerValue operator *(NumberValue left, PowerValue right)

Parameters

left NumberValue

The first object to multiply.

right PowerValue

The second object to multiply.

Returns

PowerValue

An object that is the product of left and right.

operator *(NumberValue, TemperatureValue)

Multiplies NumberValue and TemperatureValue.

public static TemperatureValue operator *(NumberValue left, TemperatureValue right)

Parameters

left NumberValue

The first object to multiply.

right TemperatureValue

The second object to multiply.

Returns

TemperatureValue

An object that is the product of left and right.

operator *(NumberValue, TimeValue)

Multiplies NumberValue and TimeValue.

public static TimeValue operator *(NumberValue left, TimeValue right)

Parameters

left NumberValue

The first object to multiply.

right TimeValue

The second object to multiply.

Returns

TimeValue

An object that is the product of left and right.

operator *(NumberValue, VolumeValue)

Multiplies NumberValue and VolumeValue.

public static VolumeValue operator *(NumberValue left, VolumeValue right)

Parameters

left NumberValue

The first object to multiply.

right VolumeValue

The second object to multiply.

Returns

VolumeValue

An object that is the product of left and right.

operator *(AngleValue, NumberValue)

Multiplies AngleValue and NumberValue.

public static AngleValue operator *(AngleValue left, NumberValue right)

Parameters

left AngleValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

AngleValue

An object that is the product of left and right.

operator *(AreaValue, NumberValue)

Multiplies AreaValue and NumberValue.

public static AreaValue operator *(AreaValue left, NumberValue right)

Parameters

left AreaValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

AreaValue

An object that is the product of left and right.

operator *(LengthValue, NumberValue)

Multiplies LengthValue and NumberValue.

public static LengthValue operator *(LengthValue left, NumberValue right)

Parameters

left LengthValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

LengthValue

An object that is the product of left and right.

operator *(MassValue, NumberValue)

Multiplies MassValue and NumberValue.

public static MassValue operator *(MassValue left, NumberValue right)

Parameters

left MassValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

MassValue

An object that is the product of left and right.

operator *(PowerValue, NumberValue)

Multiplies PowerValue and NumberValue.

public static PowerValue operator *(PowerValue left, NumberValue right)

Parameters

left PowerValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

PowerValue

An object that is the product of left and right.

operator *(TemperatureValue, NumberValue)

Multiplies TemperatureValue and NumberValue.

public static TemperatureValue operator *(TemperatureValue left, NumberValue right)

Parameters

left TemperatureValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

TemperatureValue

An object that is the product of left and right.

operator *(TimeValue, NumberValue)

Multiplies TimeValue and NumberValue.

public static TimeValue operator *(TimeValue left, NumberValue right)

Parameters

left TimeValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

TimeValue

An object that is the product of left and right.

operator *(VolumeValue, NumberValue)

Multiplies VolumeValue and NumberValue.

public static VolumeValue operator *(VolumeValue left, NumberValue right)

Parameters

left VolumeValue

The first object to multiply.

right NumberValue

The second object to multiply.

Returns

VolumeValue

An object that is the product of left and right.

operator ~(NumberValue)

Calculates NOT operation.

public static NumberValue operator ~(NumberValue number)

Parameters

number NumberValue

The left operand.

Returns

NumberValue

The result of NOT operation.

Exceptions

InvalidOperationException

number is not an integer.

operator -(double, NumberValue)

Subtracts double and NumberValue.

public static NumberValue operator -(double left, NumberValue right)

Parameters

left double

The first object to sub.

right NumberValue

The second object to sub.

Returns

NumberValue

An object that is the difference of left and right.

operator -(Complex, NumberValue)

Subtracts Complex and NumberValue.

public static Complex operator -(Complex left, NumberValue right)

Parameters

left Complex

The first object to sub.

right NumberValue

The second object to sub.

Returns

Complex

An object that is the difference of left and right.

operator -(NumberValue, double)

Subtracts NumberValue and double.

public static NumberValue operator -(NumberValue left, double right)

Parameters

left NumberValue

The first object to sub.

right double

The second object to sub.

Returns

NumberValue

An object that is the difference of left and right.

operator -(NumberValue, Complex)

Subtracts NumberValue and Complex.

public static Complex operator -(NumberValue left, Complex right)

Parameters

left NumberValue

The first object to sub.

right Complex

The second object to sub.

Returns

Complex

An object that is the difference of left and right.

operator -(NumberValue, NumberValue)

Subtracts two objects of NumberValue.

public static NumberValue operator -(NumberValue left, NumberValue right)

Parameters

left NumberValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

NumberValue

An object that is the difference of left and right.

operator -(NumberValue, AngleValue)

Subtracts NumberValue and AngleValue.

public static AngleValue operator -(NumberValue left, AngleValue right)

Parameters

left NumberValue

The first object to sub.

right AngleValue

The second object to sub.

Returns

AngleValue

An object that is the difference of left and right.

operator -(NumberValue, AreaValue)

Subtracts NumberValue and AreaValue.

public static AreaValue operator -(NumberValue left, AreaValue right)

Parameters

left NumberValue

The first object to sub.

right AreaValue

The second object to sub.

Returns

AreaValue

An object that is the difference of left and right.

operator -(NumberValue, LengthValue)

Subtracts NumberValue and LengthValue.

public static LengthValue operator -(NumberValue left, LengthValue right)

Parameters

left NumberValue

The first object to sub.

right LengthValue

The second object to sub.

Returns

LengthValue

An object that is the difference of left and right.

operator -(NumberValue, MassValue)

Subtracts NumberValue and MassValue.

public static MassValue operator -(NumberValue left, MassValue right)

Parameters

left NumberValue

The first object to sub.

right MassValue

The second object to sub.

Returns

MassValue

An object that is the difference of left and right.

operator -(NumberValue, PowerValue)

Subtracts NumberValue and PowerValue.

public static PowerValue operator -(NumberValue left, PowerValue right)

Parameters

left NumberValue

The first object to sub.

right PowerValue

The second object to sub.

Returns

PowerValue

An object that is the difference of left and right.

operator -(NumberValue, TemperatureValue)

public static TemperatureValue operator -(NumberValue left, TemperatureValue right)

Parameters

left NumberValue

The first object to sub.

right TemperatureValue

The second object to sub.

Returns

TemperatureValue

An object that is the difference of left and right.

operator -(NumberValue, TimeValue)

Subtracts NumberValue and TimeValue.

public static TimeValue operator -(NumberValue left, TimeValue right)

Parameters

left NumberValue

The first object to sub.

right TimeValue

The second object to sub.

Returns

TimeValue

An object that is the difference of left and right.

operator -(NumberValue, VolumeValue)

Subtracts NumberValue and VolumeValue.

public static VolumeValue operator -(NumberValue left, VolumeValue right)

Parameters

left NumberValue

The first object to sub.

right VolumeValue

The second object to sub.

Returns

VolumeValue

An object that is the difference of left and right.

operator -(AngleValue, NumberValue)

Subtracts AngleValue and NumberValue.

public static AngleValue operator -(AngleValue left, NumberValue right)

Parameters

left AngleValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

AngleValue

An object that is the difference of left and right.

operator -(AreaValue, NumberValue)

Subtracts AreaValue and NumberValue.

public static AreaValue operator -(AreaValue left, NumberValue right)

Parameters

left AreaValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

AreaValue

An object that is the difference of left and right.

operator -(LengthValue, NumberValue)

Subtracts LengthValue and NumberValue.

public static LengthValue operator -(LengthValue left, NumberValue right)

Parameters

left LengthValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

LengthValue

An object that is the difference of left and right.

operator -(MassValue, NumberValue)

Subtracts MassValue and NumberValue.

public static MassValue operator -(MassValue left, NumberValue right)

Parameters

left MassValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

MassValue

An object that is the difference of left and right.

operator -(PowerValue, NumberValue)

Subtracts PowerValue and NumberValue.

public static PowerValue operator -(PowerValue left, NumberValue right)

Parameters

left PowerValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

PowerValue

An object that is the difference of left and right.

operator -(TemperatureValue, NumberValue)

public static TemperatureValue operator -(TemperatureValue left, NumberValue right)

Parameters

left TemperatureValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

TemperatureValue

An object that is the difference of left and right.

operator -(TimeValue, NumberValue)

Subtracts TimeValue and NumberValue.

public static TimeValue operator -(TimeValue left, NumberValue right)

Parameters

left TimeValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

TimeValue

An object that is the difference of left and right.

operator -(VolumeValue, NumberValue)

Subtracts VolumeValue and NumberValue.

public static VolumeValue operator -(VolumeValue left, NumberValue right)

Parameters

left VolumeValue

The first object to sub.

right NumberValue

The second object to sub.

Returns

VolumeValue

An object that is the difference of left and right.

operator -(NumberValue)

Produces the negative of NumberValue.

public static NumberValue operator -(NumberValue numberValue)

Parameters

numberValue NumberValue

The number value.

Returns

NumberValue

The negative of numberValue.