------------------------------------------------------------------------------ Map a floating-point number (already represented as an integer) to an ordered integer representation, allowing for a tolerance-based comparison. Floating-point numbers have their magnitude stored in the bits 0-30 as a pair of exponent and mantissa, while the sign is stored on bit 31. That makes the positive floating-p
| 395 | // +------------+-----------------+------------------+------------------+-----------------+-----------+ |
| 396 | // |
| 397 | inline int FloatForCompare(const unsigned floatBits) |
| 398 | { |
| 399 | return floatBits < 0x80000000 ? (0x80000000 + floatBits) : (0x80000000 - (floatBits & 0x7FFFFFFF)); |
| 400 | } |
| 401 | |
| 402 | //------------------------------------------------------------------------------ |
| 403 | // |