aboutsummaryrefslogtreecommitdiff
path: root/common/math.h
AgeCommit message (Collapse)Author
2014-06-02COMMON: Make Rad<->Deg conversion use float constants.Johannes Schickel
Since we take a float parameter and return a float value we will also just work on float values all the way. This silences some float conversion warnings.
2014-02-18COMMON: Make GPL headers consistent in themselves.Johannes Schickel
2013-07-31COMMON: Move definition of math constants to scummsys header.D G Turner
This should have no effect on common/math.h as scummsys is included at the top anyway, but this will fix compilation on some toolchains when strict ANSI language compliance is enabled i.e. -std=c++11, rather than -std=gnu11. This causes an issue as a side effect is to set a guard which disables various non-standard defines in the system headers i.e. the M_PI and M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on buildbot. By moving this into scummsys.h after the point of system math.h inclusion, we can ensure that M_PI etc. are always present.
2012-03-17ALL: Use GCC_ATLEAST().Christoph Mallon
2011-08-19COMMON: intLog2 uses _BitScanReverse on MSVCBertrand Augereau
2011-07-24COMMON: Limited gcc specific intLog2 to gcc 3.4 or newer.Johannes Schickel
Older gcc versions did not include __builtin_clz, which made the PS2 port fail to compile, since it uses 3.2.2.
2011-07-24COMMON: Add an optimized intLog2 implementation for gcc using __builtin_clz.Johannes Schickel
This is done as discussed here: https://github.com/scummvm/scummvm/commit/54f25aa84373715001c56155673fb59cfe44b573
2011-07-24COMMON: Let intLog2 return an int instead of uint32, since it should return ↵Johannes Schickel
-1 for 0.
2011-07-19COMMON: Move cosine/sine tables out of header filesMatthew Hoops
Access is now restricted to using the getSineTable()/getCosineTable() helper functions.
2011-07-19COMMON: Renamed Integer Log2 function from log2 to intLog2.D G Turner
This avoids naming collisions with system libraries on some platforms i.e. DS, DC where the log2 is realised by macro.
2011-07-18COMMON: Fix commentMatthew Hoops
2011-07-18COMMON: Update code from eosMatthew Hoops
2011-07-18COMMON: Remove USE_BINK checks from header filesMatthew Hoops
2011-07-13BUILD: Allow for disabling Bink supportMatthew Hoops
2011-07-03COMMON: Remove unused vector2orientation functionMatthew Hoops
2011-07-02COMMON: Add some simple math utilitiesMatthew Hoops
Based on eos' code