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
valuedoubleThe value.
Fields
Half
1 / 2 = 0.5.
public static readonly NumberValue Half
Field Value
NaN
NaN.
public static readonly NumberValue NaN
Field Value
NegativeInfinity
NegativeInfinity.
public static readonly NumberValue NegativeInfinity
Field Value
One
public static readonly NumberValue One
Field Value
PositiveInfinity
PositiveInfinity.
public static readonly NumberValue PositiveInfinity
Field Value
Sqrt2
sqrt(2).
public static readonly NumberValue Sqrt2
Field Value
Sqrt2By2
sqrt(2) / 2.
public static readonly NumberValue Sqrt2By2
Field Value
Sqrt3
sqrt(3).
public static readonly NumberValue Sqrt3
Field Value
Sqrt3By2
sqrt(3) / 2.
public static readonly NumberValue Sqrt3By2
Field Value
Sqrt3By3
sqrt(3) / 3.
public static readonly NumberValue Sqrt3By3
Field Value
Sqrt3By3By2
2 * sqrt(3) / 3.
public static readonly NumberValue Sqrt3By3By2
Field Value
Two
public static readonly NumberValue Two
Field Value
Zero
public static readonly NumberValue Zero
Field Value
Properties
IsInfinity
Gets a value indicating whether the current number evaluates to infinity.
public bool IsInfinity { get; }
Property Value
IsNaN
Gets a value indicating whether the current value is not a number (NaN).
public bool IsNaN { get; }
Property Value
IsNegativeInfinity
Gets a value indicating whether the current number evaluates to negative infinity.
public bool IsNegativeInfinity { get; }
Property Value
IsPositiveInfinity
Gets a value indicating whether the current number evaluates to positive infinity.
public bool IsPositiveInfinity { get; }
Property Value
Number
Gets a value.
public double Number { get; }
Property Value
Sign
Gets a sign of number.
public double Sign { get; }
Property Value
Methods
Abs(NumberValue)
Returns the absolute value of a double-precision floating-point number.
public static NumberValue Abs(NumberValue numberValue)
Parameters
numberValueNumberValueA 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
numberValueNumberValueA double-precision floating-point number.
Returns
- NumberValue
The smallest integral value that is greater than or equal to
numberValue. IfnumberValueis 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
otherdoubleAn 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 otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin 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
objobjectAn 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 objin the sort order.Zero This instance occurs in the same position in the sort order as obj.Greater than zero This instance follows objin the sort order.
Exceptions
- ArgumentException
objis 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
otherNumberValueAn 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 otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Deconstruct(out double)
Deconstructs NumberValue to double.
public void Deconstruct(out double number)
Parameters
numberdoubleThe 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
otherdoubleAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
otherNumberValueAn object to compare with this object.
Returns
Exp(NumberValue)
Returns e raised to the specified power.
public static NumberValue Exp(NumberValue numberValue)
Parameters
numberValueNumberValueA number specifying a power.
Returns
- NumberValue
The number
eraised to the powernumberValue. IfnumberValueequals NaN or PositiveInfinity, that value is returned. IfnumberValueequals NegativeInfinity, 0 is returned.
Factorial(NumberValue)
Returns a factorial of specified number.
public static NumberValue Factorial(NumberValue numberValue)
Parameters
numberValueNumberValueA 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
numberValueNumberValueA double-precision floating-point number.
Returns
- NumberValue
The largest integral value less than or equal to
numberValue. IfnumberValueis 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
numberValueNumberValueThe 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
leftNumberValueThe first numbers.
rightNumberValueThe second numbers.
Returns
- NumberValue
The greatest common divisor.
GetHashCode()
Returns the hash code for this instance.
[ExcludeFromCodeCoverage]
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
aNumberValueThe first numbers.
bNumberValueThe 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
numberValueNumberValueA 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
leftNumberValueThe left operand.
rightNumberValueThe right operand.
Returns
- NumberValue
The result of '<<' operation.
Exceptions
- InvalidOperationException
leftorrightis not an integer.
Lg(NumberValue)
Returns the base 10 logarithm of a specified number.
public static NumberValue Lg(NumberValue numberValue)
Parameters
numberValueNumberValueA 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
numberValueNumberValueThe 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
numberComplexThe number whose logarithm is to be found.
baseNumberValueThe 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
numberNumberValueThe number whose logarithm is to be found.
baseNumberValueThe 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
numberComplexA double-precision floating-point number to be raised to a power.
powerNumberValueA double-precision floating-point number that specifies a power.
Returns
- Complex
The
numberraised to thepower.
Pow(NumberValue, NumberValue)
Returns a specified number raised to the specified power.
public static object Pow(NumberValue number, NumberValue power)
Parameters
numberNumberValueA double-precision floating-point number to be raised to a power.
powerNumberValueA double-precision floating-point number that specifies a power.
Returns
- object
The
numberraised to thepower.
RightShift(NumberValue, NumberValue)
Shifts left by number of bits from right.
public static NumberValue RightShift(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe left operand.
rightNumberValueThe right operand.
Returns
- NumberValue
The result of '>>' operation.
Exceptions
- InvalidOperationException
leftorrightis 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
numberNumberValueA 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
numberNumberValueA double-precision floating-point number to be rounded.
digitsNumberValueThe number of fractional digits in the return value.
Returns
- NumberValue
The number nearest to
numberthat has a number of fractional digits equal todigits. If value has fewer fractional digits thandigits,numberis 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
numberValueNumberValueThe 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
numberValueNumberValueThe 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
numberValueNumberValueThe 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
numberValueNumberValueThe 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
numberNumberValueA 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
leftdoubleThe first object to add.
rightNumberValueThe second object to add.
Returns
- NumberValue
An object that is the sum of
leftandright.
operator +(Complex, NumberValue)
Adds Complex and NumberValue.
public static Complex operator +(Complex left, NumberValue right)
Parameters
leftComplexThe first object to add.
rightNumberValueThe second object to add.
Returns
- Complex
An object that is the sum of
leftandright.
operator +(NumberValue, double)
Adds NumberValue and double.
public static NumberValue operator +(NumberValue left, double right)
Parameters
leftNumberValueThe first object to add.
rightdoubleThe second object to add.
Returns
- NumberValue
An object that is the sum of
leftandright.
operator +(NumberValue, Complex)
Adds NumberValue and Complex.
public static Complex operator +(NumberValue left, Complex right)
Parameters
leftNumberValueThe first object to add.
rightComplexThe second object to add.
Returns
- Complex
An object that is the sum of
leftandright.
operator +(NumberValue, NumberValue)
Adds two objects of NumberValue.
public static NumberValue operator +(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- NumberValue
An object that is the sum of
leftandright.
operator +(NumberValue, AngleValue)
Adds NumberValue and AngleValue.
public static AngleValue operator +(NumberValue left, AngleValue right)
Parameters
leftNumberValueThe first object to add.
rightAngleValueThe second object to add.
Returns
- AngleValue
An object that is the sum of
leftandright.
operator +(NumberValue, AreaValue)
Adds NumberValue and AreaValue.
public static AreaValue operator +(NumberValue left, AreaValue right)
Parameters
leftNumberValueThe first object to add.
rightAreaValueThe second object to add.
Returns
- AreaValue
An object that is the sum of
leftandright.
operator +(NumberValue, LengthValue)
Adds NumberValue and LengthValue.
public static LengthValue operator +(NumberValue left, LengthValue right)
Parameters
leftNumberValueThe first object to add.
rightLengthValueThe second object to add.
Returns
- LengthValue
An object that is the sum of
leftandright.
operator +(NumberValue, MassValue)
Adds NumberValue and MassValue.
public static MassValue operator +(NumberValue left, MassValue right)
Parameters
leftNumberValueThe first object to add.
rightMassValueThe second object to add.
Returns
- MassValue
An object that is the sum of
leftandright.
operator +(NumberValue, PowerValue)
Adds NumberValue and PowerValue.
public static PowerValue operator +(NumberValue left, PowerValue right)
Parameters
leftNumberValueThe first object to add.
rightPowerValueThe second object to add.
Returns
- PowerValue
An object that is the sum of
leftandright.
operator +(NumberValue, TemperatureValue)
Adds NumberValue and TemperatureValue.
public static TemperatureValue operator +(NumberValue left, TemperatureValue right)
Parameters
leftNumberValueThe first object to add.
rightTemperatureValueThe second object to add.
Returns
- TemperatureValue
An object that is the sum of
leftandright.
operator +(NumberValue, TimeValue)
Adds NumberValue and TimeValue.
public static TimeValue operator +(NumberValue left, TimeValue right)
Parameters
leftNumberValueThe first object to add.
rightTimeValueThe second object to add.
Returns
- TimeValue
An object that is the sum of
leftandright.
operator +(NumberValue, VolumeValue)
Adds NumberValue and VolumeValue.
public static VolumeValue operator +(NumberValue left, VolumeValue right)
Parameters
leftNumberValueThe first object to add.
rightVolumeValueThe second object to add.
Returns
- VolumeValue
An object that is the sum of
leftandright.
operator +(AngleValue, NumberValue)
Adds AngleValue and NumberValue.
public static AngleValue operator +(AngleValue left, NumberValue right)
Parameters
leftAngleValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- AngleValue
An object that is the sum of
leftandright.
operator +(AreaValue, NumberValue)
Adds AreaValue and NumberValue.
public static AreaValue operator +(AreaValue left, NumberValue right)
Parameters
leftAreaValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- AreaValue
An object that is the sum of
leftandright.
operator +(LengthValue, NumberValue)
Adds LengthValue and NumberValue.
public static LengthValue operator +(LengthValue left, NumberValue right)
Parameters
leftLengthValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- LengthValue
An object that is the sum of
leftandright.
operator +(MassValue, NumberValue)
Adds MassValue and NumberValue.
public static MassValue operator +(MassValue left, NumberValue right)
Parameters
leftMassValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- MassValue
An object that is the sum of
leftandright.
operator +(PowerValue, NumberValue)
Adds PowerValue and NumberValue.
public static PowerValue operator +(PowerValue left, NumberValue right)
Parameters
leftPowerValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- PowerValue
An object that is the sum of
leftandright.
operator +(TemperatureValue, NumberValue)
Adds TemperatureValue and NumberValue.
public static TemperatureValue operator +(TemperatureValue left, NumberValue right)
Parameters
leftTemperatureValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- TemperatureValue
An object that is the sum of
leftandright.
operator +(TimeValue, NumberValue)
Adds TimeValue and NumberValue.
public static TimeValue operator +(TimeValue left, NumberValue right)
Parameters
leftTimeValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- TimeValue
An object that is the sum of
leftandright.
operator +(VolumeValue, NumberValue)
Adds VolumeValue and NumberValue.
public static VolumeValue operator +(VolumeValue left, NumberValue right)
Parameters
leftVolumeValueThe first object to add.
rightNumberValueThe second object to add.
Returns
- VolumeValue
An object that is the sum of
leftandright.
operator &(NumberValue, NumberValue)
Calculates AND operation between two double values.
public static NumberValue operator &(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe left operand.
rightNumberValueThe right operand.
Returns
- NumberValue
The result of AND operation.
Exceptions
- InvalidOperationException
leftorrightis not an integer.
operator |(NumberValue, NumberValue)
Calculates OR operation between two double values.
public static NumberValue operator |(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe left operand.
rightNumberValueThe right operand.
Returns
- NumberValue
The result of OR operation.
Exceptions
- InvalidOperationException
leftorrightis not an integer.
operator /(double, NumberValue)
Divides double and NumberValue.
public static NumberValue operator /(double left, NumberValue right)
Parameters
leftdoubleThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
leftandright.
operator /(Complex, NumberValue)
Divides Complex by NumberValue.
public static Complex operator /(Complex left, NumberValue right)
Parameters
leftComplexThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- Complex
An object that is the fraction of
leftandright.
operator /(NumberValue, double)
Divides NumberValue and double.
public static NumberValue operator /(NumberValue left, double right)
Parameters
leftNumberValueThe first object to divide.
rightdoubleThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
leftandright.
operator /(NumberValue, Complex)
Divides NumberValue by Complex.
public static Complex operator /(NumberValue left, Complex right)
Parameters
leftNumberValueThe first object to divide.
rightComplexThe second object to divide.
Returns
- Complex
An object that is the fraction of
leftandright.
operator /(NumberValue, NumberValue)
Divides two objects of NumberValue.
public static NumberValue operator /(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
leftandright.
operator /(AngleValue, NumberValue)
Divides AngleValue by NumberValue.
public static AngleValue operator /(AngleValue left, NumberValue right)
Parameters
leftAngleValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- AngleValue
An object that is the fraction of
leftandright.
operator /(AreaValue, NumberValue)
Divides AreaValue by NumberValue.
public static AreaValue operator /(AreaValue left, NumberValue right)
Parameters
leftAreaValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- AreaValue
An object that is the fraction of
leftandright.
operator /(LengthValue, NumberValue)
Divides LengthValue by NumberValue.
public static LengthValue operator /(LengthValue left, NumberValue right)
Parameters
leftLengthValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- LengthValue
An object that is the fraction of
leftandright.
operator /(MassValue, NumberValue)
Divides MassValue by NumberValue.
public static MassValue operator /(MassValue left, NumberValue right)
Parameters
leftMassValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- MassValue
An object that is the fraction of
leftandright.
operator /(PowerValue, NumberValue)
Divides PowerValue by NumberValue.
public static PowerValue operator /(PowerValue left, NumberValue right)
Parameters
leftPowerValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- PowerValue
An object that is the fraction of
leftandright.
operator /(TemperatureValue, NumberValue)
Divides TemperatureValue by NumberValue.
public static TemperatureValue operator /(TemperatureValue left, NumberValue right)
Parameters
leftTemperatureValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- TemperatureValue
An object that is the fraction of
leftandright.
operator /(TimeValue, NumberValue)
Divides TimeValue by NumberValue.
public static TimeValue operator /(TimeValue left, NumberValue right)
Parameters
leftTimeValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- TimeValue
An object that is the fraction of
leftandright.
operator /(VolumeValue, NumberValue)
Divides VolumeValue by NumberValue.
public static VolumeValue operator /(VolumeValue left, NumberValue right)
Parameters
leftVolumeValueThe first object to divide.
rightNumberValueThe second object to divide.
Returns
- VolumeValue
An object that is the fraction of
leftandright.
operator ==(double, NumberValue)
Determines whether two specified instances are equal.
public static bool operator ==(double left, NumberValue right)
Parameters
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueifleftis equal toright; otherwise,false.
operator ==(NumberValue, double)
Determines whether two specified instances are equal.
public static bool operator ==(NumberValue left, double right)
Parameters
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueifleftis equal toright; otherwise,false.
operator ==(NumberValue, NumberValue)
Determines whether two specified instances of NumberValue are equal.
public static bool operator ==(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueifleftis equal toright; otherwise,false.
operator ^(NumberValue, NumberValue)
Calculates XOR operation between two double values.
public static NumberValue operator ^(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe left operand.
rightNumberValueThe right operand.
Returns
- NumberValue
The result of XOR operation.
Exceptions
- InvalidOperationException
leftorrightis 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
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than therightparameter; otherwise,false.
operator >(NumberValue, double)
Indicates whether left parameter
is greater than the right parameter.
public static bool operator >(NumberValue left, double right)
Parameters
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than therightparameter; otherwise,false.
operator >(NumberValue, NumberValue)
Indicates whether left parameter
is greater than the right parameter.
public static bool operator >(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than therightparameter; 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
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than or equal to therightparameter; 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
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than or equal to therightparameter; 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
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is greater than or equal to therightparameter; otherwise,false.
operator !=(double, NumberValue)
Determines whether two specified instances are not equal.
public static bool operator !=(double left, NumberValue right)
Parameters
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueifleftis not equal toright; otherwise,false.
operator !=(NumberValue, double)
Determines whether two specified instances are not equal.
public static bool operator !=(NumberValue left, double right)
Parameters
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueifleftis not equal toright; otherwise,false.
operator !=(NumberValue, NumberValue)
Determines whether two specified instances of NumberValue are not equal.
public static bool operator !=(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueifleftis not equal toright; otherwise,false.
operator <(double, NumberValue)
Indicates whether left parameter
is less than the right parameter.
public static bool operator <(double left, NumberValue right)
Parameters
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is less than therightparameter; otherwise,false.
operator <(NumberValue, double)
Indicates whether left parameter
is less than the right parameter.
public static bool operator <(NumberValue left, double right)
Parameters
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueif theleftparameter is less than therightparameter; otherwise,false.
operator <(NumberValue, NumberValue)
Indicates whether left parameter
is less than the right parameter.
public static bool operator <(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is less than therightparameter; 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
leftdoubleThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is less than or equal to therightparameter; 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
leftNumberValueThe first object to compare.
rightdoubleThe second object to compare.
Returns
- bool
trueif theleftparameter is less than or equal to therightparameter; 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
leftNumberValueThe first object to compare.
rightNumberValueThe second object to compare.
Returns
- bool
trueif theleftparameter is less than or equal to therightparameter; otherwise,false.
operator %(NumberValue, NumberValue)
Returns the remainder of a division.
public static NumberValue operator %(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to divide.
rightNumberValueThe 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
leftdoubleThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- NumberValue
An object that is the product of
leftandright.
operator *(Complex, NumberValue)
Multiplies Complex and NumberValue.
public static Complex operator *(Complex left, NumberValue right)
Parameters
leftComplexThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- Complex
An object that is the product of
leftandright.
operator *(NumberValue, double)
Multiplies NumberValue and double.
public static NumberValue operator *(NumberValue left, double right)
Parameters
leftNumberValueThe first object to multiply.
rightdoubleThe second object to multiply.
Returns
- NumberValue
An object that is the product of
leftandright.
operator *(NumberValue, Complex)
Multiplies NumberValue and Complex.
public static Complex operator *(NumberValue left, Complex right)
Parameters
leftNumberValueThe first object to multiply.
rightComplexThe second object to multiply.
Returns
- Complex
An object that is the product of
leftandright.
operator *(NumberValue, NumberValue)
Multiplies two objects of NumberValue.
public static NumberValue operator *(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- NumberValue
An object that is the product of
leftandright.
operator *(NumberValue, AngleValue)
Multiplies NumberValue and AngleValue.
public static AngleValue operator *(NumberValue left, AngleValue right)
Parameters
leftNumberValueThe first object to multiply.
rightAngleValueThe second object to multiply.
Returns
- AngleValue
An object that is the product of
leftandright.
operator *(NumberValue, AreaValue)
Multiplies NumberValue and AreaValue.
public static AreaValue operator *(NumberValue left, AreaValue right)
Parameters
leftNumberValueThe first object to multiply.
rightAreaValueThe second object to multiply.
Returns
- AreaValue
An object that is the product of
leftandright.
operator *(NumberValue, LengthValue)
Multiplies NumberValue and LengthValue.
public static LengthValue operator *(NumberValue left, LengthValue right)
Parameters
leftNumberValueThe first object to multiply.
rightLengthValueThe second object to multiply.
Returns
- LengthValue
An object that is the product of
leftandright.
operator *(NumberValue, MassValue)
Multiplies NumberValue and MassValue.
public static MassValue operator *(NumberValue left, MassValue right)
Parameters
leftNumberValueThe first object to multiply.
rightMassValueThe second object to multiply.
Returns
- MassValue
An object that is the product of
leftandright.
operator *(NumberValue, PowerValue)
Multiplies NumberValue and PowerValue.
public static PowerValue operator *(NumberValue left, PowerValue right)
Parameters
leftNumberValueThe first object to multiply.
rightPowerValueThe second object to multiply.
Returns
- PowerValue
An object that is the product of
leftandright.
operator *(NumberValue, TemperatureValue)
Multiplies NumberValue and TemperatureValue.
public static TemperatureValue operator *(NumberValue left, TemperatureValue right)
Parameters
leftNumberValueThe first object to multiply.
rightTemperatureValueThe second object to multiply.
Returns
- TemperatureValue
An object that is the product of
leftandright.
operator *(NumberValue, TimeValue)
Multiplies NumberValue and TimeValue.
public static TimeValue operator *(NumberValue left, TimeValue right)
Parameters
leftNumberValueThe first object to multiply.
rightTimeValueThe second object to multiply.
Returns
- TimeValue
An object that is the product of
leftandright.
operator *(NumberValue, VolumeValue)
Multiplies NumberValue and VolumeValue.
public static VolumeValue operator *(NumberValue left, VolumeValue right)
Parameters
leftNumberValueThe first object to multiply.
rightVolumeValueThe second object to multiply.
Returns
- VolumeValue
An object that is the product of
leftandright.
operator *(AngleValue, NumberValue)
Multiplies AngleValue and NumberValue.
public static AngleValue operator *(AngleValue left, NumberValue right)
Parameters
leftAngleValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- AngleValue
An object that is the product of
leftandright.
operator *(AreaValue, NumberValue)
Multiplies AreaValue and NumberValue.
public static AreaValue operator *(AreaValue left, NumberValue right)
Parameters
leftAreaValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- AreaValue
An object that is the product of
leftandright.
operator *(LengthValue, NumberValue)
Multiplies LengthValue and NumberValue.
public static LengthValue operator *(LengthValue left, NumberValue right)
Parameters
leftLengthValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- LengthValue
An object that is the product of
leftandright.
operator *(MassValue, NumberValue)
Multiplies MassValue and NumberValue.
public static MassValue operator *(MassValue left, NumberValue right)
Parameters
leftMassValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- MassValue
An object that is the product of
leftandright.
operator *(PowerValue, NumberValue)
Multiplies PowerValue and NumberValue.
public static PowerValue operator *(PowerValue left, NumberValue right)
Parameters
leftPowerValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- PowerValue
An object that is the product of
leftandright.
operator *(TemperatureValue, NumberValue)
Multiplies TemperatureValue and NumberValue.
public static TemperatureValue operator *(TemperatureValue left, NumberValue right)
Parameters
leftTemperatureValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- TemperatureValue
An object that is the product of
leftandright.
operator *(TimeValue, NumberValue)
Multiplies TimeValue and NumberValue.
public static TimeValue operator *(TimeValue left, NumberValue right)
Parameters
leftTimeValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- TimeValue
An object that is the product of
leftandright.
operator *(VolumeValue, NumberValue)
Multiplies VolumeValue and NumberValue.
public static VolumeValue operator *(VolumeValue left, NumberValue right)
Parameters
leftVolumeValueThe first object to multiply.
rightNumberValueThe second object to multiply.
Returns
- VolumeValue
An object that is the product of
leftandright.
operator ~(NumberValue)
Calculates NOT operation.
public static NumberValue operator ~(NumberValue number)
Parameters
numberNumberValueThe left operand.
Returns
- NumberValue
The result of NOT operation.
Exceptions
- InvalidOperationException
numberis not an integer.
operator -(double, NumberValue)
Subtracts double and NumberValue.
public static NumberValue operator -(double left, NumberValue right)
Parameters
leftdoubleThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- NumberValue
An object that is the difference of
leftandright.
operator -(Complex, NumberValue)
Subtracts Complex and NumberValue.
public static Complex operator -(Complex left, NumberValue right)
Parameters
leftComplexThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- Complex
An object that is the difference of
leftandright.
operator -(NumberValue, double)
Subtracts NumberValue and double.
public static NumberValue operator -(NumberValue left, double right)
Parameters
leftNumberValueThe first object to sub.
rightdoubleThe second object to sub.
Returns
- NumberValue
An object that is the difference of
leftandright.
operator -(NumberValue, Complex)
Subtracts NumberValue and Complex.
public static Complex operator -(NumberValue left, Complex right)
Parameters
leftNumberValueThe first object to sub.
rightComplexThe second object to sub.
Returns
- Complex
An object that is the difference of
leftandright.
operator -(NumberValue, NumberValue)
Subtracts two objects of NumberValue.
public static NumberValue operator -(NumberValue left, NumberValue right)
Parameters
leftNumberValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- NumberValue
An object that is the difference of
leftandright.
operator -(NumberValue, AngleValue)
Subtracts NumberValue and AngleValue.
public static AngleValue operator -(NumberValue left, AngleValue right)
Parameters
leftNumberValueThe first object to sub.
rightAngleValueThe second object to sub.
Returns
- AngleValue
An object that is the difference of
leftandright.
operator -(NumberValue, AreaValue)
Subtracts NumberValue and AreaValue.
public static AreaValue operator -(NumberValue left, AreaValue right)
Parameters
leftNumberValueThe first object to sub.
rightAreaValueThe second object to sub.
Returns
- AreaValue
An object that is the difference of
leftandright.
operator -(NumberValue, LengthValue)
Subtracts NumberValue and LengthValue.
public static LengthValue operator -(NumberValue left, LengthValue right)
Parameters
leftNumberValueThe first object to sub.
rightLengthValueThe second object to sub.
Returns
- LengthValue
An object that is the difference of
leftandright.
operator -(NumberValue, MassValue)
Subtracts NumberValue and MassValue.
public static MassValue operator -(NumberValue left, MassValue right)
Parameters
leftNumberValueThe first object to sub.
rightMassValueThe second object to sub.
Returns
- MassValue
An object that is the difference of
leftandright.
operator -(NumberValue, PowerValue)
Subtracts NumberValue and PowerValue.
public static PowerValue operator -(NumberValue left, PowerValue right)
Parameters
leftNumberValueThe first object to sub.
rightPowerValueThe second object to sub.
Returns
- PowerValue
An object that is the difference of
leftandright.
operator -(NumberValue, TemperatureValue)
Subtracts NumberValue and TemperatureValue.
public static TemperatureValue operator -(NumberValue left, TemperatureValue right)
Parameters
leftNumberValueThe first object to sub.
rightTemperatureValueThe second object to sub.
Returns
- TemperatureValue
An object that is the difference of
leftandright.
operator -(NumberValue, TimeValue)
Subtracts NumberValue and TimeValue.
public static TimeValue operator -(NumberValue left, TimeValue right)
Parameters
leftNumberValueThe first object to sub.
rightTimeValueThe second object to sub.
Returns
- TimeValue
An object that is the difference of
leftandright.
operator -(NumberValue, VolumeValue)
Subtracts NumberValue and VolumeValue.
public static VolumeValue operator -(NumberValue left, VolumeValue right)
Parameters
leftNumberValueThe first object to sub.
rightVolumeValueThe second object to sub.
Returns
- VolumeValue
An object that is the difference of
leftandright.
operator -(AngleValue, NumberValue)
Subtracts AngleValue and NumberValue.
public static AngleValue operator -(AngleValue left, NumberValue right)
Parameters
leftAngleValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- AngleValue
An object that is the difference of
leftandright.
operator -(AreaValue, NumberValue)
Subtracts AreaValue and NumberValue.
public static AreaValue operator -(AreaValue left, NumberValue right)
Parameters
leftAreaValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- AreaValue
An object that is the difference of
leftandright.
operator -(LengthValue, NumberValue)
Subtracts LengthValue and NumberValue.
public static LengthValue operator -(LengthValue left, NumberValue right)
Parameters
leftLengthValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- LengthValue
An object that is the difference of
leftandright.
operator -(MassValue, NumberValue)
Subtracts MassValue and NumberValue.
public static MassValue operator -(MassValue left, NumberValue right)
Parameters
leftMassValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- MassValue
An object that is the difference of
leftandright.
operator -(PowerValue, NumberValue)
Subtracts PowerValue and NumberValue.
public static PowerValue operator -(PowerValue left, NumberValue right)
Parameters
leftPowerValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- PowerValue
An object that is the difference of
leftandright.
operator -(TemperatureValue, NumberValue)
Subtracts TemperatureValue and NumberValue.
public static TemperatureValue operator -(TemperatureValue left, NumberValue right)
Parameters
leftTemperatureValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- TemperatureValue
An object that is the difference of
leftandright.
operator -(TimeValue, NumberValue)
Subtracts TimeValue and NumberValue.
public static TimeValue operator -(TimeValue left, NumberValue right)
Parameters
leftTimeValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- TimeValue
An object that is the difference of
leftandright.
operator -(VolumeValue, NumberValue)
Subtracts VolumeValue and NumberValue.
public static VolumeValue operator -(VolumeValue left, NumberValue right)
Parameters
leftVolumeValueThe first object to sub.
rightNumberValueThe second object to sub.
Returns
- VolumeValue
An object that is the difference of
leftandright.
operator -(NumberValue)
Produces the negative of NumberValue.
public static NumberValue operator -(NumberValue numberValue)
Parameters
numberValueNumberValueThe number value.
Returns
- NumberValue
The negative of
numberValue.