DoubleExtensions
Static Class in Zigurous.Math
Declaration
public static class DoubleExtensions
Description
Extension methods for doubles.
Extension Methods
IsNaN | Checks if the value is NaN . |
IsInfinite | Checks if the value is infinite. |
IsPositiveInfinity | Checks if the value is equal to positive infinity. |
IsNegativeInfinity | Checks if the value is equal to negative infinity. |
IsRealNumber | Checks if the value is a real number (not infinite and not NaN ). |
IsImaginaryNumber | Checks if the value is an imaginary number (infinite or NaN ). |
IsDividable | Checks if the value can be divided (not zero, not infinite, and not NaN ). |
IsPositive | Checks if the value is positive. |
IsNegative | Checks if the value is negative. |
IsZero | Checks if the value is zero given a margin of error specified by an epsilon. |
IsEqualTo | Checks for equality with another value given a margin of error specified by an epsilon. |
ToAbbreviatedString | Converts the number to an abbreviated string, e.g. "1k" for 1000. |
UnsetImaginary | Sets the value to a new value if the value is an imaginary number (infinite or NaN ). |
UnsetInfinite | Sets the value to a new value if the value is an infinite number. |
UnsetNaN | Sets the value to a new value if the value is NaN . |
UnsetZero | Sets the value to a new value if the value is zero given a margin of error specified by an epsilon. |