X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=fltpoint.h;fp=fltpoint.h;h=558ad7b5d24e378c01b607d486b5de3b62889d62;hp=c3d4038709012046e195904c8988191b8c962ef9;hb=261f8d9198c4235bcdced4403ba391553e6bd0d1;hpb=ae528e6fdb8bd5c41ed9690bec03402ccbb4ecae diff --git a/fltpoint.h b/fltpoint.h index c3d4038..558ad7b 100644 --- a/fltpoint.h +++ b/fltpoint.h @@ -1,13 +1,20 @@ // -// Cross-platform floating point handling +// Cross-platform floating point handling (fixed point handling too!) // // by James Hammons // (C) 2018 Underground Software // +#ifndef __FLTPOINT_H__ +#define __FLTPOINT_H__ + #include uint32_t FloatToIEEE754(float f); uint64_t DoubleToIEEE754(double d); void DoubleToExtended(double d, uint8_t out[]); +uint64_t DoubleToFixedPoint(double d, int intBits, int fracBits); + +#endif // __FLTPOINT_H__ +