Utilities to facilitate bitwise manipulation of floating point numbers.
- Namespace
- RandN
.Implementation - Base Types
- object
Syntax
public static class FloatUtils
Fields
Name | Field Type | Constant Value | Summary |
---|---|---|---|
MachineEpsilonDouble | double | 2.220446049250313E-16 | The machine epsilon value for double .static |
MachineEpsilonSingle | float | 1.1920929E-07 | The machine epsilon value for float .static |
Methods
Name | Return Value | Summary |
---|---|---|
DecrementMantissa | decimal | Decrements the mantissa of a decimal by one, wrapping by increasing the scale if necessary. static |
Force | double | Reduces the precision of the given number if it's extended precision. static |
Force | float | Reduces the precision of the given number if it's extended precision. static |
Into | float | static |
Into | double | static |
ToBits | ulong | Reinterprets the bits of num as a ulong .static |
ToBits | uint | Reinterprets the bits of num as a uint .static |
ToFloat | float | Reinterprets bits as a float .static |
ToFloat | double | Reinterprets bits as a double .static |