]> Shamusworld >> Repos - rmac/blob - fltpoint.h
Now we're pretty sure that the codebase doesn't cause any regressions.
[rmac] / fltpoint.h
1 //
2 // Cross-platform floating point handling (fixed point handling too!)
3 //
4 // by James Hammons
5 // (C) 2018 Underground Software
6 //
7
8 #ifndef __FLTPOINT_H__
9 #define __FLTPOINT_H__
10
11 #include <stdint.h>
12
13 uint32_t FloatToIEEE754(float f);
14 uint64_t DoubleToIEEE754(double d);
15 void DoubleToExtended(double d, uint8_t out[]);
16
17 uint64_t DoubleToFixedPoint(double d, int intBits, int fracBits);
18
19 #endif  // __FLTPOINT_H__
20