]> Shamusworld >> Repos - rmac/blob - fltpoint.h
Minor changes and version bump for prior commit; now at v2.0.5.
[rmac] / fltpoint.h
1 //
2 // Cross-platform floating point handling (fixed point handling too!)
3 //
4 // by James Hammons
5 // (C) 2019 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 uint32_t DoubleToDSPFloat(double d);
17
18 uint64_t DoubleToFixedPoint(double d, int intBits, int fracBits);
19
20 #endif  // __FLTPOINT_H__
21