\brief Encode a single float value with lossless encoding to integer */
| 136 | \brief Encode a single float value with lossless encoding to integer |
| 137 | */ |
| 138 | PX_FORCE_INLINE PxU32 encodeFloat(PxU32 ir) |
| 139 | { |
| 140 | //we may need to check on -0 and 0 |
| 141 | //But it should make no practical difference. |
| 142 | if(ir & PX_SIGN_BITMASK) //negative? |
| 143 | return ~ir;//reverse sequence of negative numbers |
| 144 | else |
| 145 | return ir | PX_SIGN_BITMASK; // flip sign |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | \brief Encode a single float value with lossless encoding to integer |
no outgoing calls
no test coverage detected