Class InpNumber
Floating number that supports automatic implicit conversion to and from an integer number.
Inheritance
Namespace: SprutCAMTech.SCPostprocessor
Assembly: SprutCAMTech.SCPostprocessor.dll
Syntax
public sealed class InpNumber : ValueType
Constructors
InpNumber(double)
Initializes the InpNumber by the given value of the type double.
Declaration
public InpNumber(double value)
Parameters
Type | Name | Description |
---|---|---|
double | value | Numerical value for initialization. |
InpNumber(int)
Initializes the InpNumber by the given value of the type int.
Declaration
public InpNumber(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | Numerical value for initialization. |
InpNumber(float)
Initializes the InpNumber by the given value of the type float.
Declaration
public InpNumber(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | Numerical value for initialization. |
Methods
ToString()
Converts this numerical value to a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Operators
operator +(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. |
operator /(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 operator byte(InpNumber)
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 |
---|---|
byte |
explicit operator short(InpNumber)
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 |
---|---|
short |
explicit operator float(InpNumber)
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 |
---|---|
float |
explicit operator uint(InpNumber)
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 |
---|---|
uint |
explicit operator InpNumber(byte)
Explicit conversion between byte and InpNumber.
Declaration
public static explicit operator InpNumber(byte n)
Parameters
Type | Name | Description |
---|---|---|
byte | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
explicit operator InpNumber(short)
Explicit conversion between short and InpNumber.
Declaration
public static explicit operator InpNumber(short n)
Parameters
Type | Name | Description |
---|---|---|
short | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
explicit operator InpNumber(float)
Explicit conversion between float and InpNumber.
Declaration
public static explicit operator InpNumber(float n)
Parameters
Type | Name | Description |
---|---|---|
float | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
explicit operator InpNumber(uint)
Explicit conversion between uint and InpNumber.
Declaration
public static explicit operator InpNumber(uint n)
Parameters
Type | Name | Description |
---|---|---|
uint | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
implicit operator double(InpNumber)
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 |
---|---|
double |
implicit operator int(InpNumber)
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 |
---|---|
int |
implicit operator InpNumber(double)
Implicit conversion between InpNumber and double.
Declaration
public static implicit operator InpNumber(double n)
Parameters
Type | Name | Description |
---|---|---|
double | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
implicit operator InpNumber(int)
Implicit conversion between int and InpNumber.
Declaration
public static implicit operator InpNumber(int n)
Parameters
Type | Name | Description |
---|---|---|
int | n | The value to convert. |
Returns
Type | Description |
---|---|
InpNumber |
operator *(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. |
operator -(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. |
operator -(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. |
operator +(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. |