aboutsummaryrefslogtreecommitdiff
path: root/common/sinetables.h
AgeCommit message (Collapse)Author
2018-08-25COMMON: Cos/Sin Table switch internal structure so at() is fasterDavid Fioramonti
A new internal table has been added so that no if checks need to be performed for the at() lookup. The old table can still be accessed using getTable or atLegacy(). at() and atLegacy() return the same values, but at() is faster.
2018-08-18COMMON: allow cos/sin number of points to be more flexibleDavid Fioramonti
Previously, the cos/sin table had to be a power of 2, but there are many use cases where the number of points is not necessarily a power of 2 so this change the constructor so it now takes in the number of points rather than the number of points as the exponent of a power of 2. The restriction is that the size must be divisible by 4.
2018-07-25COMMON: Add at() index function to cosine/sine tableDavid Fioramonti
The cos/sin table class now has an at() function for indexing safely into its internal array. This allows the checking and computing of the correct indexes to be done internally. The indexing in allows cos/sine of 0 to 2pi to be obtained. The values returned by getTable are the same as before. Comments that describe the values that the table contains has been modified to line up with what the code is doing.
2014-02-18COMMON: Make GPL headers consistent in themselves.Johannes Schickel
2013-06-08COMMON: Try to document the SineTable/CosineTable table entries.Johannes Schickel
2012-04-14COMMON: Replaced static Sine and Cosine tables with dynamic generated.D G Turner
This removes the large static tables from the binary (which saves 500K to 1Mb of binary size) and replaced them with a class which generates the required tables as needed in RAM. This has been tested with QDM2 and shows no obvious performance degredation and Memprof shows no significant rise in RAM usage.
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-02COMMON: Add some simple math utilitiesMatthew Hoops
Based on eos' code