Honeycomb  0.1
Component-Model Framework
Static Public Member Functions | List of all members
honey::Trig_< Real > Class Template Reference

Trigonometry. More...

#include <Trig.h>

Static Public Member Functions

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...
 

Detailed Description

template<class Real>
class honey::Trig_< Real >

Trigonometry.

Member Function Documentation

template<class Real >
static Real honey::Trig_< Real >::acos ( Real  x)
inlinestatic

Convert cosine ratio [-1, 1] to radian angle [0, pi].

template<class Real >
static Real honey::Trig_< Real >::alignAngle ( Real  angleFrom,
Real  angleTo 
)
inlinestatic

Calc smallest angle to align angleFrom with angleTo. Angles must be normalized. Result is in range [-pi, pi].

template<class Real >
static Real honey::Trig_< Real >::asin ( Real  x)
inlinestatic

Convert sine ratio [-1, 1] to radian angle [-pi/2, pi/2].

template<class Real >
static Real honey::Trig_< Real >::atan ( Real  x)
inlinestatic

Convert tangent ratio [-inf, inf] to radian angle [-pi/2, pi/2].

template<class Real >
static Real honey::Trig_< Real >::atan2 ( Real  y,
Real  x 
)
inlinestatic

Converts Cartesian(x,y) to Polar(r, theta), and returns radian angle theta [-pi, pi].

template<class Real >
static Real honey::Trig_< Real >::cos ( Real  x)
inlinestatic

Cos of radian angle.

template<class Real >
static Real honey::Trig_< Real >::degree ( Real  radian)
inlinestatic

Convert angle in radians to angle in degrees.

template<class Real >
static Real honey::Trig_< Real >::distanceAngle ( Real  angle,
Real  angle2 
)
inlinestatic

Calc shortest angular distance between angle and angle2. Angles must be normalized. Result is in range [0, pi].

template<class Real >
void honey::Trig_< Real >::enableSinTable ( bool  enable,
int  size = -1 
)
static

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.

template<class Real >
static Real honey::Trig_< Real >::normalizeAngle ( Real  angle)
inlinestatic

Get an equivalent angle in the normalized range [-pi, pi].

template<class Real >
static Real honey::Trig_< Real >::radian ( Real  degree)
inlinestatic

Convert angle in degrees to angle in radians.

template<class Real >
static Real honey::Trig_< Real >::sin ( Real  x)
inlinestatic

Sin of radian angle.

template<class Real >
static Real honey::Trig_< Real >::tan ( Real  x)
inlinestatic

Tan of radian angle.


The documentation for this class was generated from the following files: