A trigonometry table.
More...
#include <psyqo/trigonometry.hh>
|
| Trig () |
|
constexpr FixedPoint< precisionBits > | cos (Angle a) const |
| Calculate the cosine of an angle.
|
|
constexpr FixedPoint< precisionBits > | sin (Angle a) const |
| Calculate the sine of an angle.
|
|
template<unsigned precisionBits = 12>
class psyqo::Trig< precisionBits >
A trigonometry table.
This is a trigonometry table. It is used to calculate sine and cosine values for angles. It is constructed with a template parameter that specifies the number of bits of precision to use for the table. The default is 12 bits.
- Template Parameters
-
precisionBits | The number of bits of precision to use for the FixedPoint values in the table. |
◆ Trig()
template<unsigned precisionBits = 12>
◆ cos()
template<unsigned precisionBits = 12>
constexpr FixedPoint< precisionBits > psyqo::Trig< precisionBits >::cos |
( |
Angle |
a | ) |
const |
|
inlineconstexpr |
Calculate the cosine of an angle.
- Parameters
-
a | The angle to calculate the cosine of. |
- Returns
- FixedPoint<precisionBits> The cosine of the angle.
◆ sin()
template<unsigned precisionBits = 12>
constexpr FixedPoint< precisionBits > psyqo::Trig< precisionBits >::sin |
( |
Angle |
a | ) |
const |
|
inlineconstexpr |
Calculate the sine of an angle.
- Parameters
-
a | The angle to calculate the sine of. |
- Returns
- FixedPoint<precisionBits> The sine of the angle.
The documentation for this class was generated from the following file: