Main Page -
Class Hierarchy -
Class List -
File List -
Class Members -
Related Pages -

Information | Reference | SourceForge Project | Author
Muli3D

Reference: Muli3D: m3dmath_common.h File Reference

m3dmath_common.h File Reference


Detailed Description

#include "../m3dbase.h"
#include <float.h>
#include <math.h>

Go to the source code of this file.

Defines

#define M3D_PI   3.141592654f

Functions

float32 fClamp (const float32 i_fVal, const float32 i_fLower, const float32 i_fUpper)
float32 fDegToRad (const float32 i_fVal)
float32 fLerp (const float32 i_fValA, const float32 i_fValB, const float32 i_fInterpolation)
float32 fRadToDeg (const float32 i_fVal)
float32 fSaturate (const float32 i_fVal)
int32 iClamp (const int32 i_iVal, const int32 i_iLower, const int32 i_iUpper)


Define Documentation

#define M3D_PI   3.141592654f
 

Pi.


Function Documentation

float32 fClamp const float32  i_fVal,
const float32  i_fLower,
const float32  i_fUpper
[inline]
 

Clamps a floating-point value.

Parameters:
[in] i_fVal value to clamp.
[in] i_fLower minimum value.
[in] i_fUpper maximum value.
Returns:
clamped value e [i_fLower,i_fUpper].

float32 fDegToRad const float32  i_fVal  )  [inline]
 

Converts degrees to radians.

Parameters:
[in] i_fVal degrees.
Returns:
radians.

float32 fLerp const float32  i_fValA,
const float32  i_fValB,
const float32  i_fInterpolation
[inline]
 

Linearly interpolates between two values

Parameters:
[in] i_fValA first value.
[in] i_fValB second value.
[in] i_fInterpolation interpolation factor e [0.0f,1.0f].
Returns:
interpolated value.

float32 fRadToDeg const float32  i_fVal  )  [inline]
 

Converts radians to degrees.

Parameters:
[in] i_fVal radians.
Returns:
degrees.

float32 fSaturate const float32  i_fVal  )  [inline]
 

Clamps a floating-point value to [0.0f,1.0f].

Parameters:
[in] i_fVal value to saturate.
Returns:
saturated value e [0.0f,1.0f].

int32 iClamp const int32  i_iVal,
const int32  i_iLower,
const int32  i_iUpper
[inline]
 

Clamps an integer value.

Parameters:
[in] i_iVal value to clamp.
[in] i_iLower minimum value.
[in] i_iUpper maximum value.
Returns:
clamped value e [i_iLower,i_iUpper].

Documentation created with doxygen SourceForge.net Logo