| NumericGetSignificantBitsSigned Method |
Gets the significant bits of a floating-point number, which can be used for rough
comparisons or sorting. (The floating-point number can negative or positive.)
Namespace: DigitalRune.MathematicsAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax [CLSCompliantAttribute(false)]
public static uint GetSignificantBitsSigned(
float value,
int n
)
<CLSCompliantAttribute(false)>
Public Shared Function GetSignificantBitsSigned (
value As Single,
n As Integer
) As UInteger
public:
[CLSCompliantAttribute(false)]
static unsigned int GetSignificantBitsSigned(
float value,
int n
)
[<CLSCompliantAttribute(false)>]
static member GetSignificantBitsSigned :
value : float32 *
n : int -> uint32
Parameters
- value
- Type: SystemSingle
The floating-point number. - n
- Type: SystemInt32
The number of significant bits.
Return Value
Type:
UInt32The
n significant bits of
value.
Remarks
The sign bit is flipped to ensure that the bit representation of a positive floating-point
number is greater than the bit representation of a negative number.
See Also