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
doubleThe 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
numberValue
NumberValueA 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
NumberValueA double-precision floating-point number.
Returns
- NumberValue
The smallest integral value that is greater than or equal to
numberValue
. IfnumberValue
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
doubleAn 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
objectAn 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
NumberValueAn 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
doubleThe 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
doubleAn 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
obj
objectThe 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
NumberValueAn object to compare with this object.
Returns
Exp(NumberValue)
Returns e
raised to the specified power.
public static NumberValue Exp(NumberValue numberValue)
Parameters
numberValue
NumberValueA number specifying a power.
Returns
- NumberValue
The number
e
raised to the powernumberValue
. IfnumberValue
equals NaN or PositiveInfinity, that value is returned. IfnumberValue
equals NegativeInfinity, 0 is returned.
Factorial(NumberValue)
Returns a factorial of specified number.
public static NumberValue Factorial(NumberValue numberValue)
Parameters
numberValue
NumberValueA 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
NumberValueA double-precision floating-point number.
Returns
- NumberValue
The largest integral value less than or equal to
numberValue
. IfnumberValue
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
NumberValueThe 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
NumberValueThe first numbers.
right
NumberValueThe 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
NumberValueThe first numbers.
b
NumberValueThe 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
NumberValueA 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
NumberValueThe left operand.
right
NumberValueThe right operand.
Returns
- NumberValue
The result of '<<' operation.
Exceptions
- InvalidOperationException
left
orright
is not an integer.
Lg(NumberValue)
Returns the base 10 logarithm of a specified number.
public static NumberValue Lg(NumberValue numberValue)
Parameters
numberValue
NumberValueA 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
NumberValueThe 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
ComplexThe number whose logarithm is to be found.
base
NumberValueThe 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
NumberValueThe number whose logarithm is to be found.
base
NumberValueThe 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
ComplexA double-precision floating-point number to be raised to a power.
power
NumberValueA double-precision floating-point number that specifies a power.
Returns
- Complex
The
number
raised to thepower
.
Pow(NumberValue, NumberValue)
Returns a specified number raised to the specified power.
public static object Pow(NumberValue number, NumberValue power)
Parameters
number
NumberValueA double-precision floating-point number to be raised to a power.
power
NumberValueA double-precision floating-point number that specifies a power.
Returns
- object
The
number
raised to thepower
.
RightShift(NumberValue, NumberValue)
Shifts left
by number of bits from right
.
public static NumberValue RightShift(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe left operand.
right
NumberValueThe right operand.
Returns
- NumberValue
The result of '>>' operation.
Exceptions
- InvalidOperationException
left
orright
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
NumberValueA 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
NumberValueA double-precision floating-point number to be rounded.
digits
NumberValueThe number of fractional digits in the return value.
Returns
- NumberValue
The number nearest to
number
that has a number of fractional digits equal todigits
. If value has fewer fractional digits thandigits
,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
NumberValueThe 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
NumberValueThe 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
NumberValueThe 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
NumberValueThe 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
NumberValueA 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
doubleThe first object to add.
right
NumberValueThe second object to add.
Returns
- NumberValue
An object that is the sum of
left
andright
.
operator +(Complex, NumberValue)
Adds Complex and NumberValue.
public static Complex operator +(Complex left, NumberValue right)
Parameters
left
ComplexThe first object to add.
right
NumberValueThe second object to add.
Returns
- Complex
An object that is the sum of
left
andright
.
operator +(NumberValue, double)
Adds NumberValue and double.
public static NumberValue operator +(NumberValue left, double right)
Parameters
left
NumberValueThe first object to add.
right
doubleThe second object to add.
Returns
- NumberValue
An object that is the sum of
left
andright
.
operator +(NumberValue, Complex)
Adds NumberValue and Complex.
public static Complex operator +(NumberValue left, Complex right)
Parameters
left
NumberValueThe first object to add.
right
ComplexThe second object to add.
Returns
- Complex
An object that is the sum of
left
andright
.
operator +(NumberValue, NumberValue)
Adds two objects of NumberValue.
public static NumberValue operator +(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- NumberValue
An object that is the sum of
left
andright
.
operator +(NumberValue, AngleValue)
Adds NumberValue and AngleValue.
public static AngleValue operator +(NumberValue left, AngleValue right)
Parameters
left
NumberValueThe first object to add.
right
AngleValueThe second object to add.
Returns
- AngleValue
An object that is the sum of
left
andright
.
operator +(NumberValue, AreaValue)
Adds NumberValue and AreaValue.
public static AreaValue operator +(NumberValue left, AreaValue right)
Parameters
left
NumberValueThe first object to add.
right
AreaValueThe second object to add.
Returns
- AreaValue
An object that is the sum of
left
andright
.
operator +(NumberValue, LengthValue)
Adds NumberValue and LengthValue.
public static LengthValue operator +(NumberValue left, LengthValue right)
Parameters
left
NumberValueThe first object to add.
right
LengthValueThe second object to add.
Returns
- LengthValue
An object that is the sum of
left
andright
.
operator +(NumberValue, MassValue)
Adds NumberValue and MassValue.
public static MassValue operator +(NumberValue left, MassValue right)
Parameters
left
NumberValueThe first object to add.
right
MassValueThe second object to add.
Returns
- MassValue
An object that is the sum of
left
andright
.
operator +(NumberValue, PowerValue)
Adds NumberValue and PowerValue.
public static PowerValue operator +(NumberValue left, PowerValue right)
Parameters
left
NumberValueThe first object to add.
right
PowerValueThe second object to add.
Returns
- PowerValue
An object that is the sum of
left
andright
.
operator +(NumberValue, TemperatureValue)
Adds NumberValue and TemperatureValue.
public static TemperatureValue operator +(NumberValue left, TemperatureValue right)
Parameters
left
NumberValueThe first object to add.
right
TemperatureValueThe second object to add.
Returns
- TemperatureValue
An object that is the sum of
left
andright
.
operator +(NumberValue, TimeValue)
Adds NumberValue and TimeValue.
public static TimeValue operator +(NumberValue left, TimeValue right)
Parameters
left
NumberValueThe first object to add.
right
TimeValueThe second object to add.
Returns
- TimeValue
An object that is the sum of
left
andright
.
operator +(NumberValue, VolumeValue)
Adds NumberValue and VolumeValue.
public static VolumeValue operator +(NumberValue left, VolumeValue right)
Parameters
left
NumberValueThe first object to add.
right
VolumeValueThe second object to add.
Returns
- VolumeValue
An object that is the sum of
left
andright
.
operator +(AngleValue, NumberValue)
Adds AngleValue and NumberValue.
public static AngleValue operator +(AngleValue left, NumberValue right)
Parameters
left
AngleValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- AngleValue
An object that is the sum of
left
andright
.
operator +(AreaValue, NumberValue)
Adds AreaValue and NumberValue.
public static AreaValue operator +(AreaValue left, NumberValue right)
Parameters
left
AreaValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- AreaValue
An object that is the sum of
left
andright
.
operator +(LengthValue, NumberValue)
Adds LengthValue and NumberValue.
public static LengthValue operator +(LengthValue left, NumberValue right)
Parameters
left
LengthValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- LengthValue
An object that is the sum of
left
andright
.
operator +(MassValue, NumberValue)
Adds MassValue and NumberValue.
public static MassValue operator +(MassValue left, NumberValue right)
Parameters
left
MassValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- MassValue
An object that is the sum of
left
andright
.
operator +(PowerValue, NumberValue)
Adds PowerValue and NumberValue.
public static PowerValue operator +(PowerValue left, NumberValue right)
Parameters
left
PowerValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- PowerValue
An object that is the sum of
left
andright
.
operator +(TemperatureValue, NumberValue)
Adds TemperatureValue and NumberValue.
public static TemperatureValue operator +(TemperatureValue left, NumberValue right)
Parameters
left
TemperatureValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- TemperatureValue
An object that is the sum of
left
andright
.
operator +(TimeValue, NumberValue)
Adds TimeValue and NumberValue.
public static TimeValue operator +(TimeValue left, NumberValue right)
Parameters
left
TimeValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- TimeValue
An object that is the sum of
left
andright
.
operator +(VolumeValue, NumberValue)
Adds VolumeValue and NumberValue.
public static VolumeValue operator +(VolumeValue left, NumberValue right)
Parameters
left
VolumeValueThe first object to add.
right
NumberValueThe second object to add.
Returns
- VolumeValue
An object that is the sum of
left
andright
.
operator &(NumberValue, NumberValue)
Calculates AND operation between two double values.
public static NumberValue operator &(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe left operand.
right
NumberValueThe right operand.
Returns
- NumberValue
The result of AND operation.
Exceptions
- InvalidOperationException
left
orright
is not an integer.
operator |(NumberValue, NumberValue)
Calculates OR operation between two double values.
public static NumberValue operator |(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe left operand.
right
NumberValueThe right operand.
Returns
- NumberValue
The result of OR operation.
Exceptions
- InvalidOperationException
left
orright
is not an integer.
operator /(double, NumberValue)
Divides double and NumberValue.
public static NumberValue operator /(double left, NumberValue right)
Parameters
left
doubleThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
left
andright
.
operator /(Complex, NumberValue)
Divides Complex by NumberValue.
public static Complex operator /(Complex left, NumberValue right)
Parameters
left
ComplexThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- Complex
An object that is the fraction of
left
andright
.
operator /(NumberValue, double)
Divides NumberValue and double.
public static NumberValue operator /(NumberValue left, double right)
Parameters
left
NumberValueThe first object to divide.
right
doubleThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
left
andright
.
operator /(NumberValue, Complex)
Divides NumberValue by Complex.
public static Complex operator /(NumberValue left, Complex right)
Parameters
left
NumberValueThe first object to divide.
right
ComplexThe second object to divide.
Returns
- Complex
An object that is the fraction of
left
andright
.
operator /(NumberValue, NumberValue)
Divides two objects of NumberValue.
public static NumberValue operator /(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- NumberValue
An object that is the fraction of
left
andright
.
operator /(AngleValue, NumberValue)
Divides AngleValue by NumberValue.
public static AngleValue operator /(AngleValue left, NumberValue right)
Parameters
left
AngleValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- AngleValue
An object that is the fraction of
left
andright
.
operator /(AreaValue, NumberValue)
Divides AreaValue by NumberValue.
public static AreaValue operator /(AreaValue left, NumberValue right)
Parameters
left
AreaValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- AreaValue
An object that is the fraction of
left
andright
.
operator /(LengthValue, NumberValue)
Divides LengthValue by NumberValue.
public static LengthValue operator /(LengthValue left, NumberValue right)
Parameters
left
LengthValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- LengthValue
An object that is the fraction of
left
andright
.
operator /(MassValue, NumberValue)
Divides MassValue by NumberValue.
public static MassValue operator /(MassValue left, NumberValue right)
Parameters
left
MassValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- MassValue
An object that is the fraction of
left
andright
.
operator /(PowerValue, NumberValue)
Divides PowerValue by NumberValue.
public static PowerValue operator /(PowerValue left, NumberValue right)
Parameters
left
PowerValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- PowerValue
An object that is the fraction of
left
andright
.
operator /(TemperatureValue, NumberValue)
Divides TemperatureValue by NumberValue.
public static TemperatureValue operator /(TemperatureValue left, NumberValue right)
Parameters
left
TemperatureValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- TemperatureValue
An object that is the fraction of
left
andright
.
operator /(TimeValue, NumberValue)
Divides TimeValue by NumberValue.
public static TimeValue operator /(TimeValue left, NumberValue right)
Parameters
left
TimeValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- TimeValue
An object that is the fraction of
left
andright
.
operator /(VolumeValue, NumberValue)
Divides VolumeValue by NumberValue.
public static VolumeValue operator /(VolumeValue left, NumberValue right)
Parameters
left
VolumeValueThe first object to divide.
right
NumberValueThe second object to divide.
Returns
- VolumeValue
An object that is the fraction of
left
andright
.
operator ==(double, NumberValue)
Determines whether two specified instances are equal.
public static bool operator ==(double left, NumberValue right)
Parameters
left
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
ifleft
is equal toright
; otherwise,false
.
operator ==(NumberValue, double)
Determines whether two specified instances are equal.
public static bool operator ==(NumberValue left, double right)
Parameters
left
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
ifleft
is 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
left
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
ifleft
is equal toright
; otherwise,false
.
operator ^(NumberValue, NumberValue)
Calculates XOR operation between two double values.
public static NumberValue operator ^(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe left operand.
right
NumberValueThe right operand.
Returns
- NumberValue
The result of XOR operation.
Exceptions
- InvalidOperationException
left
orright
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
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than theright
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
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than theright
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
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than theright
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
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than or equal to theright
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
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than or equal to theright
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
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is greater than or equal to theright
parameter; otherwise,false
.
operator !=(double, NumberValue)
Determines whether two specified instances are not equal.
public static bool operator !=(double left, NumberValue right)
Parameters
left
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
ifleft
is 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
left
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
ifleft
is 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
left
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
ifleft
is 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
left
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than theright
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
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than theright
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
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than theright
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
doubleThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than or equal to theright
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
NumberValueThe first object to compare.
right
doubleThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than or equal to theright
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
NumberValueThe first object to compare.
right
NumberValueThe second object to compare.
Returns
- bool
true
if theleft
parameter is less than or equal to theright
parameter; otherwise,false
.
operator %(NumberValue, NumberValue)
Returns the remainder of a division.
public static NumberValue operator %(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe first object to divide.
right
NumberValueThe 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
doubleThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- NumberValue
An object that is the product of
left
andright
.
operator *(Complex, NumberValue)
Multiplies Complex and NumberValue.
public static Complex operator *(Complex left, NumberValue right)
Parameters
left
ComplexThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- Complex
An object that is the product of
left
andright
.
operator *(NumberValue, double)
Multiplies NumberValue and double.
public static NumberValue operator *(NumberValue left, double right)
Parameters
left
NumberValueThe first object to multiply.
right
doubleThe second object to multiply.
Returns
- NumberValue
An object that is the product of
left
andright
.
operator *(NumberValue, Complex)
Multiplies NumberValue and Complex.
public static Complex operator *(NumberValue left, Complex right)
Parameters
left
NumberValueThe first object to multiply.
right
ComplexThe second object to multiply.
Returns
- Complex
An object that is the product of
left
andright
.
operator *(NumberValue, NumberValue)
Multiplies two objects of NumberValue.
public static NumberValue operator *(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- NumberValue
An object that is the product of
left
andright
.
operator *(NumberValue, AngleValue)
Multiplies NumberValue and AngleValue.
public static AngleValue operator *(NumberValue left, AngleValue right)
Parameters
left
NumberValueThe first object to multiply.
right
AngleValueThe second object to multiply.
Returns
- AngleValue
An object that is the product of
left
andright
.
operator *(NumberValue, AreaValue)
Multiplies NumberValue and AreaValue.
public static AreaValue operator *(NumberValue left, AreaValue right)
Parameters
left
NumberValueThe first object to multiply.
right
AreaValueThe second object to multiply.
Returns
- AreaValue
An object that is the product of
left
andright
.
operator *(NumberValue, LengthValue)
Multiplies NumberValue and LengthValue.
public static LengthValue operator *(NumberValue left, LengthValue right)
Parameters
left
NumberValueThe first object to multiply.
right
LengthValueThe second object to multiply.
Returns
- LengthValue
An object that is the product of
left
andright
.
operator *(NumberValue, MassValue)
Multiplies NumberValue and MassValue.
public static MassValue operator *(NumberValue left, MassValue right)
Parameters
left
NumberValueThe first object to multiply.
right
MassValueThe second object to multiply.
Returns
- MassValue
An object that is the product of
left
andright
.
operator *(NumberValue, PowerValue)
Multiplies NumberValue and PowerValue.
public static PowerValue operator *(NumberValue left, PowerValue right)
Parameters
left
NumberValueThe first object to multiply.
right
PowerValueThe second object to multiply.
Returns
- PowerValue
An object that is the product of
left
andright
.
operator *(NumberValue, TemperatureValue)
Multiplies NumberValue and TemperatureValue.
public static TemperatureValue operator *(NumberValue left, TemperatureValue right)
Parameters
left
NumberValueThe first object to multiply.
right
TemperatureValueThe second object to multiply.
Returns
- TemperatureValue
An object that is the product of
left
andright
.
operator *(NumberValue, TimeValue)
Multiplies NumberValue and TimeValue.
public static TimeValue operator *(NumberValue left, TimeValue right)
Parameters
left
NumberValueThe first object to multiply.
right
TimeValueThe second object to multiply.
Returns
- TimeValue
An object that is the product of
left
andright
.
operator *(NumberValue, VolumeValue)
Multiplies NumberValue and VolumeValue.
public static VolumeValue operator *(NumberValue left, VolumeValue right)
Parameters
left
NumberValueThe first object to multiply.
right
VolumeValueThe second object to multiply.
Returns
- VolumeValue
An object that is the product of
left
andright
.
operator *(AngleValue, NumberValue)
Multiplies AngleValue and NumberValue.
public static AngleValue operator *(AngleValue left, NumberValue right)
Parameters
left
AngleValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- AngleValue
An object that is the product of
left
andright
.
operator *(AreaValue, NumberValue)
Multiplies AreaValue and NumberValue.
public static AreaValue operator *(AreaValue left, NumberValue right)
Parameters
left
AreaValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- AreaValue
An object that is the product of
left
andright
.
operator *(LengthValue, NumberValue)
Multiplies LengthValue and NumberValue.
public static LengthValue operator *(LengthValue left, NumberValue right)
Parameters
left
LengthValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- LengthValue
An object that is the product of
left
andright
.
operator *(MassValue, NumberValue)
Multiplies MassValue and NumberValue.
public static MassValue operator *(MassValue left, NumberValue right)
Parameters
left
MassValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- MassValue
An object that is the product of
left
andright
.
operator *(PowerValue, NumberValue)
Multiplies PowerValue and NumberValue.
public static PowerValue operator *(PowerValue left, NumberValue right)
Parameters
left
PowerValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- PowerValue
An object that is the product of
left
andright
.
operator *(TemperatureValue, NumberValue)
Multiplies TemperatureValue and NumberValue.
public static TemperatureValue operator *(TemperatureValue left, NumberValue right)
Parameters
left
TemperatureValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- TemperatureValue
An object that is the product of
left
andright
.
operator *(TimeValue, NumberValue)
Multiplies TimeValue and NumberValue.
public static TimeValue operator *(TimeValue left, NumberValue right)
Parameters
left
TimeValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- TimeValue
An object that is the product of
left
andright
.
operator *(VolumeValue, NumberValue)
Multiplies VolumeValue and NumberValue.
public static VolumeValue operator *(VolumeValue left, NumberValue right)
Parameters
left
VolumeValueThe first object to multiply.
right
NumberValueThe second object to multiply.
Returns
- VolumeValue
An object that is the product of
left
andright
.
operator ~(NumberValue)
Calculates NOT operation.
public static NumberValue operator ~(NumberValue number)
Parameters
number
NumberValueThe 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
doubleThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- NumberValue
An object that is the difference of
left
andright
.
operator -(Complex, NumberValue)
Subtracts Complex and NumberValue.
public static Complex operator -(Complex left, NumberValue right)
Parameters
left
ComplexThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- Complex
An object that is the difference of
left
andright
.
operator -(NumberValue, double)
Subtracts NumberValue and double.
public static NumberValue operator -(NumberValue left, double right)
Parameters
left
NumberValueThe first object to sub.
right
doubleThe second object to sub.
Returns
- NumberValue
An object that is the difference of
left
andright
.
operator -(NumberValue, Complex)
Subtracts NumberValue and Complex.
public static Complex operator -(NumberValue left, Complex right)
Parameters
left
NumberValueThe first object to sub.
right
ComplexThe second object to sub.
Returns
- Complex
An object that is the difference of
left
andright
.
operator -(NumberValue, NumberValue)
Subtracts two objects of NumberValue.
public static NumberValue operator -(NumberValue left, NumberValue right)
Parameters
left
NumberValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- NumberValue
An object that is the difference of
left
andright
.
operator -(NumberValue, AngleValue)
Subtracts NumberValue and AngleValue.
public static AngleValue operator -(NumberValue left, AngleValue right)
Parameters
left
NumberValueThe first object to sub.
right
AngleValueThe second object to sub.
Returns
- AngleValue
An object that is the difference of
left
andright
.
operator -(NumberValue, AreaValue)
Subtracts NumberValue and AreaValue.
public static AreaValue operator -(NumberValue left, AreaValue right)
Parameters
left
NumberValueThe first object to sub.
right
AreaValueThe second object to sub.
Returns
- AreaValue
An object that is the difference of
left
andright
.
operator -(NumberValue, LengthValue)
Subtracts NumberValue and LengthValue.
public static LengthValue operator -(NumberValue left, LengthValue right)
Parameters
left
NumberValueThe first object to sub.
right
LengthValueThe second object to sub.
Returns
- LengthValue
An object that is the difference of
left
andright
.
operator -(NumberValue, MassValue)
Subtracts NumberValue and MassValue.
public static MassValue operator -(NumberValue left, MassValue right)
Parameters
left
NumberValueThe first object to sub.
right
MassValueThe second object to sub.
Returns
- MassValue
An object that is the difference of
left
andright
.
operator -(NumberValue, PowerValue)
Subtracts NumberValue and PowerValue.
public static PowerValue operator -(NumberValue left, PowerValue right)
Parameters
left
NumberValueThe first object to sub.
right
PowerValueThe second object to sub.
Returns
- PowerValue
An object that is the difference of
left
andright
.
operator -(NumberValue, TemperatureValue)
Subtracts NumberValue and TemperatureValue.
public static TemperatureValue operator -(NumberValue left, TemperatureValue right)
Parameters
left
NumberValueThe first object to sub.
right
TemperatureValueThe second object to sub.
Returns
- TemperatureValue
An object that is the difference of
left
andright
.
operator -(NumberValue, TimeValue)
Subtracts NumberValue and TimeValue.
public static TimeValue operator -(NumberValue left, TimeValue right)
Parameters
left
NumberValueThe first object to sub.
right
TimeValueThe second object to sub.
Returns
- TimeValue
An object that is the difference of
left
andright
.
operator -(NumberValue, VolumeValue)
Subtracts NumberValue and VolumeValue.
public static VolumeValue operator -(NumberValue left, VolumeValue right)
Parameters
left
NumberValueThe first object to sub.
right
VolumeValueThe second object to sub.
Returns
- VolumeValue
An object that is the difference of
left
andright
.
operator -(AngleValue, NumberValue)
Subtracts AngleValue and NumberValue.
public static AngleValue operator -(AngleValue left, NumberValue right)
Parameters
left
AngleValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- AngleValue
An object that is the difference of
left
andright
.
operator -(AreaValue, NumberValue)
Subtracts AreaValue and NumberValue.
public static AreaValue operator -(AreaValue left, NumberValue right)
Parameters
left
AreaValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- AreaValue
An object that is the difference of
left
andright
.
operator -(LengthValue, NumberValue)
Subtracts LengthValue and NumberValue.
public static LengthValue operator -(LengthValue left, NumberValue right)
Parameters
left
LengthValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- LengthValue
An object that is the difference of
left
andright
.
operator -(MassValue, NumberValue)
Subtracts MassValue and NumberValue.
public static MassValue operator -(MassValue left, NumberValue right)
Parameters
left
MassValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- MassValue
An object that is the difference of
left
andright
.
operator -(PowerValue, NumberValue)
Subtracts PowerValue and NumberValue.
public static PowerValue operator -(PowerValue left, NumberValue right)
Parameters
left
PowerValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- PowerValue
An object that is the difference of
left
andright
.
operator -(TemperatureValue, NumberValue)
Subtracts TemperatureValue and NumberValue.
public static TemperatureValue operator -(TemperatureValue left, NumberValue right)
Parameters
left
TemperatureValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- TemperatureValue
An object that is the difference of
left
andright
.
operator -(TimeValue, NumberValue)
Subtracts TimeValue and NumberValue.
public static TimeValue operator -(TimeValue left, NumberValue right)
Parameters
left
TimeValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- TimeValue
An object that is the difference of
left
andright
.
operator -(VolumeValue, NumberValue)
Subtracts VolumeValue and NumberValue.
public static VolumeValue operator -(VolumeValue left, NumberValue right)
Parameters
left
VolumeValueThe first object to sub.
right
NumberValueThe second object to sub.
Returns
- VolumeValue
An object that is the difference of
left
andright
.
operator -(NumberValue)
Produces the negative of NumberValue.
public static NumberValue operator -(NumberValue numberValue)
Parameters
numberValue
NumberValueThe number value.
Returns
- NumberValue
The negative of
numberValue
.