NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
cmath API

Standard C cmath API functions. More...

Data Structures

struct  VectorType
 This structure is used for storing three axis values in a single object. More...
 

Macros

#define Sqrt(_X)   asm { sqrt __FLTRETVAL__, _X }
 Compute square root.
 
#define Sin(_X)   asm { sin __FLTRETVAL__, _X }
 Compute sine.
 
#define Cos(_X)   asm { cos __FLTRETVAL__, _X }
 Compute cosine.
 
#define Asin(_X)   asm { asin __FLTRETVAL__, _X }
 Compute arc sine.
 
#define Acos(_X)   asm { acos __FLTRETVAL__, _X }
 Compute arc cosine.
 
#define Atan(_X)   asm { atan __FLTRETVAL__, _X }
 Compute arc tangent.
 
#define Ceil(_X)   asm { ceil __FLTRETVAL__, _X }
 Round up value.
 
#define Exp(_X)   asm { exp __FLTRETVAL__, _X }
 Compute exponential function .
 
#define Floor(_X)   asm { floor __FLTRETVAL__, _X }
 Round down value.
 
#define Tan(_X)   asm { tan __FLTRETVAL__, _X }
 Compute tangent.
 
#define Tanh(_X)   asm { tanh __FLTRETVAL__, _X }
 Compute hyperbolic tangent.
 
#define Cosh(_X)   asm { cosh __FLTRETVAL__, _X }
 Compute hyperbolic cosine.
 
#define Sinh(_X)   asm { sinh __FLTRETVAL__, _X }
 Compute hyperbolic sine.
 
#define Log(_X)   asm { log __FLTRETVAL__, _X }
 Compute natural logarithm.
 
#define Log10(_X)   asm { log10 __FLTRETVAL__, _X }
 Compute common logarithm.
 
#define Atan2(_Y, _X)   asm { atan2 __FLTRETVAL__, _Y, _X }
 Compute arc tangent with 2 parameters.
 
#define Pow(_Base, _Exponent)   asm { pow __FLTRETVAL__, _Base, _Exponent }
 Raise to power.
 
#define Trunc(_X)   asm { trunc __RETVAL__, _X }
 Compute integral part.
 
#define Frac(_X)   asm { frac __FLTRETVAL__, _X }
 Compute fractional part.
 
#define MulDiv32(_A, _B, _C)   asm { muldiv __RETVAL__, _A, _B, _C }
 Multiply and divide.
 
#define SinD(_X)   asm { sind __FLTRETVAL__, _X }
 Compute sine (degrees).
 
#define CosD(_X)   asm { cosd __FLTRETVAL__, _X }
 Compute cosine (degrees).
 
#define AsinD(_X)   asm { asind __FLTRETVAL__, _X }
 Compute arch sine (degrees).
 
#define AcosD(_X)   asm { acosd __FLTRETVAL__, _X }
 Compute arc cosine (degrees).
 
#define AtanD(_X)   asm { atand __FLTRETVAL__, _X }
 Compute arc tangent (degrees).
 
#define TanD(_X)   asm { tand __FLTRETVAL__, _X }
 Compute tangent (degrees).
 
#define TanhD(_X)   asm { tanhd __FLTRETVAL__, _X }
 Compute hyperbolic tangent (degrees).
 
#define CoshD(_X)   asm { coshd __FLTRETVAL__, _X }
 Compute hyperbolic cosine (degrees).
 
#define SinhD(_X)   asm { sinhd __FLTRETVAL__, _X }
 Compute hyperbolic sine (degrees).
 
#define Atan2D(_Y, _X)   asm { atan2d __FLTRETVAL__, _Y, _X }
 Compute arc tangent with two parameters (degrees).
 

Functions

float sqrt (float x)
 Compute square root.
 
float cos (float x)
 Compute cosine.
 
float sin (float x)
 Compute sine.
 
float tan (float x)
 Compute tangent.
 
float acos (float x)
 Compute arc cosine.
 
float asin (float x)
 Compute arc sine.
 
float atan (float x)
 Compute arc tangent.
 
float atan2 (float y, float x)
 Compute arc tangent with 2 parameters.
 
float cosh (float x)
 Compute hyperbolic cosine.
 
float sinh (float x)
 Compute hyperbolic sine.
 
float tanh (float x)
 Compute hyperbolic tangent.
 
float exp (float x)
 Compute exponential function.
 
float log (float x)
 Compute natural logarithm.
 
float log10 (float x)
 Compute common logarithm.
 
long trunc (float x)
 Compute integral part.
 
float frac (float x)
 Compute fractional part.
 
float pow (float base, float exponent)
 Raise to power.
 
float ceil (float x)
 Round up value.
 
float floor (float x)
 Round down value.
 
long muldiv32 (long a, long b, long c)
 Multiply and divide.
 
float cosd (float x)
 Compute cosine (degrees).
 
float sind (float x)
 Compute sine (degrees).
 
float tand (float x)
 Compute tangent (degrees).
 
float acosd (float x)
 Compute arc cosine (degrees).
 
float asind (float x)
 Compute arc sine (degrees).
 
float atand (float x)
 Compute arc tangent (degrees).
 
float atan2d (float y, float x)
 Compute arc tangent with 2 parameters (degrees).
 
float coshd (float x)
 Compute hyperbolic cosine (degrees).
 
float sinhd (float x)
 Compute hyperbolic sine (degrees).
 
float tanhd (float x)
 Compute hyperbolic tangent (degrees).
 
byte bcd2dec (byte bcd)
 Convert from BCD to decimal Return the decimal equivalent of the binary coded decimal value provided.
 
bool isNAN (float value)
 Is the value NaN.
 
char sign (variant num)
 Sign value.
 
void VectorCross (VectorType a, VectorType b, VectorType &out)
 VectorCross function.
 
float VectorDot (VectorType a, VectorType b)
 VectorDot function.
 
void VectorNormalize (VectorType &a)
 VectorNormalize function.
 

Detailed Description

Standard C cmath API functions.