Trigonometry.
More...
#include <Trig.h>
|
static void | enableSinTable (bool enable, int size=-1) |
| Enable or disable sin table. If no size is specified then the table will not be resized, or if uninitialized it will be set to tableSizeDefault. More...
|
|
static Real | sin (Real x) |
| Sin of radian angle. More...
|
|
static Real | asin (Real x) |
| Convert sine ratio [-1, 1] to radian angle [-pi/2, pi/2]. More...
|
|
static Real | cos (Real x) |
| Cos of radian angle. More...
|
|
static Real | acos (Real x) |
| Convert cosine ratio [-1, 1] to radian angle [0, pi]. More...
|
|
static Real | tan (Real x) |
| Tan of radian angle. More...
|
|
static Real | atan (Real x) |
| Convert tangent ratio [-inf, inf] to radian angle [-pi/2, pi/2]. More...
|
|
static Real | atan2 (Real y, Real x) |
| Converts Cartesian(x,y) to Polar(r, theta), and returns radian angle theta [-pi, pi]. More...
|
|
static Real | radian (Real degree) |
| Convert angle in degrees to angle in radians. More...
|
|
static Real | degree (Real radian) |
| Convert angle in radians to angle in degrees. More...
|
|
static Real | normalizeAngle (Real angle) |
| Get an equivalent angle in the normalized range [-pi, pi]. More...
|
|
static Real | alignAngle (Real angleFrom, Real angleTo) |
| Calc smallest angle to align angleFrom with angleTo. Angles must be normalized. Result is in range [-pi, pi]. More...
|
|
static Real | distanceAngle (Real angle, Real angle2) |
| Calc shortest angular distance between angle and angle2. Angles must be normalized. Result is in range [0, pi]. More...
|
|
template<class Real>
class honey::Trig_< Real >
Trigonometry.
Convert cosine ratio [-1, 1] to radian angle [0, pi].
Calc smallest angle to align angleFrom with angleTo. Angles must be normalized. Result is in range [-pi, pi].
Convert sine ratio [-1, 1] to radian angle [-pi/2, pi/2].
Convert tangent ratio [-inf, inf] to radian angle [-pi/2, pi/2].
Converts Cartesian(x,y) to Polar(r, theta), and returns radian angle theta [-pi, pi].
Convert angle in radians to angle in degrees.
Calc shortest angular distance between angle and angle2. Angles must be normalized. Result is in range [0, pi].
Enable or disable sin table. If no size is specified then the table will not be resized, or if uninitialized it will be set to tableSizeDefault.
Get an equivalent angle in the normalized range [-pi, pi].
Convert angle in degrees to angle in radians.
The documentation for this class was generated from the following files: