pfSinCos(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages pfSinCos(3pf)NAME
pfSinCos, pfTan, pfArcTan2, pfArcSin, pfArcCos, pfSqrt - Fast math
routines sin, cos, sqrt
FUNCTION SPECIFICATION
#include <Performer/pr.h>
void pfSinCos(float arg, float* sin, float* cos);
float pfTan(float arg);
float pfArcTan2(float y, float x);
float pfArcSin(float arg);
float pfArcCos(float arg);
float pfSqrt(float arg);
DESCRIPTIONpfSinCos returns sine and cosine of arg degrees in the locations pointed
to by sin and cos. The routine is less accurate than that provided in
libm, but faster. It also loses precision earlier for large arguments.
For accuracy within an error tolerance of 1/1000, the argument must be in
the range -7500 to +7500 degrees.
pfTan returns the tangent of arg degrees.
pfArcTan2 returns the arc tangent of y/x in the range -180 to +180
degrees using the signs of both arguments to determine the quadrant of
the return value.
pfArcSin returns the arc sine of arg in the range -90 to +90 degrees.
pfArcCos returns the arc sine of arg in the range 0 to 180 degrees.
pfSqrt returns the square root of arg.
NOTES
Performance: The current Performer math routines are simply wrappers
that call the routines in math.h from libm or libfastm. The routines may
be changed in the future, but they should always perform as well or
better than the corresponding routines in libm and libfastm.
Linking Currently for maximum performance, programs should be linked to
libfastm. Please refer to the libfastm man page for a description of the
impact this may have on accuracy.
Page 1
pfSinCos(3pf) OpenGL Performer 3.2.2 libpr C++ Reference Pages pfSinCos(3pf)SEE ALSO
pfMatrix, pfVec3
Page 2