PxMath.h File Reference
#include "foundation/PxPreprocessor.h"
#include <math.h>
#include <float.h>
#include "foundation/PxIntrinsics.h"
#include "foundation/PxSharedAssert.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
PX_CUDA_CALLABLE PX_FORCE_INLINEPxMax (T a, T b)
 The return value is the greater of the two specified values. More...
 
template<>
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxMax (float a, float b)
 overload for float to use fsel on xbox More...
 
template<class T >
PX_CUDA_CALLABLE PX_FORCE_INLINEPxMin (T a, T b)
 The return value is the lesser of the two specified values. More...
 
template<>
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxMin (float a, float b)
 overload for float to use fsel on xbox More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAbs (float a)
 abs returns the absolute value of its argument. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxEquals (float a, float b, float eps)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxAbs (double a)
 abs returns the absolute value of its argument. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE int32_t PxAbs (int32_t a)
 abs returns the absolute value of its argument. More...
 
template<class T >
PX_CUDA_CALLABLE PX_FORCE_INLINEPxClamp (T v, T lo, T hi)
 Clamps v to the range [hi,lo]. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSqrt (float a)
 Square root. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxSqrt (double a)
 Square root. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxRecipSqrt (float a)
 reciprocal square root. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxRecipSqrt (double a)
 reciprocal square root. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSin (float a)
 trigonometry – all angles are in radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxSin (double a)
 Sine of an angle ( Unit: Radians ) More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxCos (float a)
 Cosine of an angle (Unit: Radians) More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxCos (double a)
 Cosine of an angle (Unit: Radians) More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxTan (float a)
 Tangent of an angle. Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxTan (double a)
 Tangent of an angle. Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAsin (float f)
 Arcsine. Returns angle between -PI/2 and PI/2 in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxAsin (double f)
 Arcsine. Returns angle between -PI/2 and PI/2 in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAcos (float f)
 Arccosine. Returns angle between 0 and PI in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxAcos (double f)
 Arccosine. Returns angle between 0 and PI in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAtan (float a)
 ArcTangent. Returns angle between -PI/2 and PI/2 in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxAtan (double a)
 ArcTangent. Returns angle between -PI/2 and PI/2 in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAtan2 (float x, float y)
 Arctangent of (x/y) with correct sign. Returns angle between -PI and PI in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE double PxAtan2 (double x, double y)
 Arctangent of (x/y) with correct sign. Returns angle between -PI and PI in radians Unit: Radians. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxIsFinite (float f)
 returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxIsFinite (double f)
 returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxFloor (float a)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxExp (float a)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxCeil (float a)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSign (float a)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxPow (float x, float y)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxLog (float x)
 

Variables

static const float PxPi = float(3.141592653589793)
 
static const float PxHalfPi = float(1.57079632679489661923)
 
static const float PxTwoPi = float(6.28318530717958647692)
 
static const float PxInvPi = float(0.31830988618379067154)
 
static const float PxInvTwoPi = float(0.15915494309189533577)
 
static const float PxPiDivTwo = float(1.57079632679489661923)
 
static const float PxPiDivFour = float(0.78539816339744830962)