Provides utility methods for compressing and decompressing float values. More...
Static Public Member Functions | |
static unsafe int | Compress (float f, int accuracy=DEFAULT_ACCURACY) |
Compresses a float value. More... | |
static unsafe float | Decompress (int value, float accuracy=DEFAULT_ACCURACY) |
Decompresses a compressed float value. More... | |
Static Public Attributes | |
const int | DEFAULT_ACCURACY = 1 << 10 |
Default accuracy for float compression and decompression. More... | |
Provides utility methods for compressing and decompressing float values.
|
static |
Compresses a float value.
f | The float value to compress. |
accuracy | The accuracy to use for compression. Defaults to DEFAULT_ACCURACY. |
|
static |
Decompresses a compressed float value.
value | The compressed float value to decompress. |
accuracy | The accuracy to use for decompression. Defaults to DEFAULT_ACCURACY. |
|
static |
Default accuracy for float compression and decompression.