KMotionDef - Standard Math Functions
From Dynomotion
These are standard C programming Mathematical Functions, and are only listed here as a quick reference.
Functions using Float variables
sqrtf
extern float sqrtf (float x);
Returns the square root of the supplied float x, as a float. x must be greater than 0.
expf
extern float expf (float x);
Returns the exponential of the supplied float x, as a float.
logf
extern float logf (float x);
Returns the natural logarithm of the supplied float x, as a float. x must be greater than 0.
log10f
extern float log10f(float x);
Returns the base 10 logarithm of the supplied float x, as a float. x must be greater than 0.
powf
extern float powf (float x, float y);
Returns the x to the power y of the supplied floats x and y, as a float.
sinf
extern float sinf (float x);
Returns the sine of float x, as a float.
cosf
extern float cosf (float x);
Returns the cosine of float x, as a float.
tanf
extern float tanf (float x);
Returns the tangent of float x, as a float.
asinf
extern float asinf (float x);
Returns the inverse sine (sin-1) of float x, as a float.
acosf
extern float acosf (float x);
Returns the inverse cosine (cos-1) of float x, as a float.
atanf
extern float atanf (float x);
Returns the inverse tangent (tan-1) of float x, as a float.
atan2f
extern float atan2f(float y, float x);
Returns the inverse tangent of float y over float x (tan-1(X/Y)), as a float.
fast_fabsf
extern float fast_fabsf (float y);
Returns the absolute value of float y, as a float.
Functions using Double variables
sqrt
extern double sqrt (double x);
exp
extern double exp (double x);
log
extern double log (double x);
log10
extern double log10(double x);
pow
extern double pow (double x, double y);
sin
extern double sin (double x);
cos
extern double cos (double x);
tan
extern double tan (double x);
asin
extern double asin (double x);
acos
extern double acos (double x);
atan
extern double atan (double x);
atan2
extern double atan2(double y, double x);
fast_fabs
extern double fast_fabs (double y);