aboutsummaryrefslogtreecommitdiff
path: root/common/math.h
AgeCommit message (Collapse)Author
2019-10-03BLADERUNNER: Remove use of C99 math functionsCameron Cawley
2018-05-28COMMON: coding convention improvements for degree conversion funcsDavid Fioramonti
Removed whitespace before template keyword. Made template types camel case starting with lowercase.
2018-05-20COMMON: Template deg2rad and rad2deg in Common/mathDavid Fioramonti
The input and output type can be different. Currently, rad2deg is only being used by sci (float to int) and deg2rad in wintermute.
2017-12-03ALL: Remove obsolete register keywordColin Snover
The register keyword was deprecated from the C++11 standard, <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>, and removed from the C++17 standard, <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so cannot exist in a well-formed C++17 program. It has never done anything in GCC <https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html> and because of the way it is specified in the standard, it is “as meaningful as whitespace” <http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>. The one remaining use of the register keyword is in the DS backend, where it is used to create a local register variable using the non-standard GCC Extended Asm feature. Closes gh-1079.
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