Struct InpNumber
Floating number that supports automatic implicit conversion to and from an integer number.
Inherited Members
Namespace: SprutTechnology.SCPostprocessor
Assembly: SCPostprocessor.dll
Syntax
public readonly struct InpNumber
Constructors
InpNumber(Double)
Initializes the InpNumber by the given value of the type double.
Declaration
public InpNumber(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | Numerical value for initialization. |
InpNumber(Int32)
Initializes the InpNumber by the given value of the type int.
Declaration
public InpNumber(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | Numerical value for initialization. |
InpNumber(Single)
Initializes the InpNumber by the given value of the type float.
Declaration
public InpNumber(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | Numerical value for initialization. |
Methods
ToString()
Converts this numerical value to a string.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
Addition(InpNumber, InpNumber)
"+" operator for InpNumbers.
Declaration
public static InpNumber operator +(InpNumber a, InpNumber b)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The first number to add. |
InpNumber | b | The second number to add. |
Returns
Type | Description |
---|---|
InpNumber | The sum of two values. |
Division(InpNumber, InpNumber)
"/" operator for InpNumbers.
Declaration
public static InpNumber operator /(InpNumber a, InpNumber b)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The first number to divide. |
InpNumber | b | The second number to divide. |
Returns
Type | Description |
---|---|
InpNumber | The division of two values. |
Explicit(InpNumber to Byte)
Explicit conversion between InpNumber and byte.
Declaration
public static explicit operator byte (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.Byte |
Explicit(InpNumber to Int16)
Explicit conversion between InpNumber and short.
Declaration
public static explicit operator short (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.Int16 |
Explicit(InpNumber to Single)
Explicit conversion between InpNumber and float.
Declaration
public static explicit operator float (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.Single |
Explicit(InpNumber to UInt32)
Explicit conversion between InpNumber and uint.
Declaration
public static explicit operator uint (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.UInt32 |
Explicit(Byte to InpNumber)
Explicit conversion between byte and InpNumber.
Declaration
public static explicit operator InpNumber(byte n)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Explicit(Int16 to InpNumber)
Explicit conversion between short and InpNumber.
Declaration
public static explicit operator InpNumber(short n)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Explicit(Single to InpNumber)
Explicit conversion between float and InpNumber.
Declaration
public static explicit operator InpNumber(float n)
Parameters
Type | Name | Description |
---|---|---|
System.Single | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Explicit(UInt32 to InpNumber)
Explicit conversion between uint and InpNumber.
Declaration
public static explicit operator InpNumber(uint n)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Implicit(InpNumber to Double)
Implicit conversion between double and InpNumber.
Declaration
public static implicit operator double (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.Double |
Implicit(InpNumber to Int32)
Implicit conversion between InpNumber and int.
Declaration
public static implicit operator int (InpNumber n)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | n | The value to convert. |
Returns
Type | Description |
---|---|
System.Int32 |
Implicit(Double to InpNumber)
Implicit conversion between InpNumber and double.
Declaration
public static implicit operator InpNumber(double n)
Parameters
Type | Name | Description |
---|---|---|
System.Double | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Implicit(Int32 to InpNumber)
Implicit conversion between int and InpNumber.
Declaration
public static implicit operator InpNumber(int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
Multiply(InpNumber, InpNumber)
"*" operator for InpNumbers.
Declaration
public static InpNumber operator *(InpNumber a, InpNumber b)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The first number to multiply. |
InpNumber | b | The second number to multiply. |
Returns
Type | Description |
---|---|
InpNumber | The multiplication of two values. |
Subtraction(InpNumber, InpNumber)
"-" operator for InpNumbers.
Declaration
public static InpNumber operator -(InpNumber a, InpNumber b)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The first number to subtract from. |
InpNumber | b | The second number to subtract. |
Returns
Type | Description |
---|---|
InpNumber | The difference of two values. |
UnaryNegation(InpNumber)
Unary "-" operator for InpNumbers.
Declaration
public static InpNumber operator -(InpNumber a)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The number to negate. |
Returns
Type | Description |
---|---|
InpNumber | Opposite sign value. |
UnaryPlus(InpNumber)
Unary "+" operator for InpNumbers.
Declaration
public static InpNumber operator +(InpNumber a)
Parameters
Type | Name | Description |
---|---|---|
InpNumber | a | The number to convert. |
Returns
Type | Description |
---|---|
InpNumber | The same number. |