30 #ifndef PXFOUNDATION_PXMATH_H 31 #define PXFOUNDATION_PXMATH_H 41 #pragma warning(disable : 4985) // 'symbol name': attributes not present on previous declaration 58 static const float PxPi = float(3.141592653589793);
59 static const float PxHalfPi = float(1.57079632679489661923);
60 static const float PxTwoPi = float(6.28318530717958647692);
61 static const float PxInvPi = float(0.31830988618379067154);
62 static const float PxInvTwoPi = float(0.15915494309189533577);
63 static const float PxPiDivTwo = float(1.57079632679489661923);
64 static const float PxPiDivFour = float(0.78539816339744830962);
114 return (
PxAbs(a - b) < eps);
218 return ::asinf(
PxClamp(f, -1.0f, 1.0f));
228 return ::asin(
PxClamp(f, -1.0, 1.0));
238 return ::acosf(
PxClamp(f, -1.0f, 1.0f));
248 return ::acos(
PxClamp(f, -1.0, 1.0));
278 return ::atan2f(x, y);
288 return ::atan2(x, y);
338 #endif // #ifndef PXFOUNDATION_PXMATH_H Definition: GuContactBuffer.h:37
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxPow(float x, float y)
Definition: PxMath.h:323
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...
Definition: PxMath.h:276
PX_CUDA_CALLABLE PX_FORCE_INLINE float sqrt(float a)
platform-specific square root
Definition: PxUnixIntrinsics.h:86
PX_CUDA_CALLABLE PX_FORCE_INLINE float sqrt(float a)
platform-specific square root
Definition: PxWindowsIntrinsics.h:81
static const float PxPi
Definition: PxMath.h:58
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxExp(float a)
Definition: PxMath.h:308
PX_CUDA_CALLABLE PX_FORCE_INLINE float recipSqrt(float a)
platform-specific reciprocal square root
Definition: PxUnixIntrinsics.h:92
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSin(float a)
trigonometry – all angles are in radians.
Definition: PxMath.h:170
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxLog(float x)
Definition: PxMath.h:328
static const float PxPiDivTwo
Definition: PxMath.h:63
static const float PxHalfPi
Definition: PxMath.h:59
PX_CUDA_CALLABLE PX_FORCE_INLINE float selectMin(float a, float b)
platform-specific minimum
Definition: PxUnixIntrinsics.h:115
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxClamp(T v, T lo, T hi)
Clamps v to the range [hi,lo].
Definition: PxMath.h:137
PX_CUDA_CALLABLE PX_FORCE_INLINE float selectMax(float a, float b)
platform-specific maximum
Definition: PxUnixIntrinsics.h:121
#define PX_SHARED_ASSERT(exp)
Definition: PxSharedAssert.h:39
PX_CUDA_CALLABLE PX_FORCE_INLINE float sign(float a)
platform-specific sign
Definition: PxUnixIntrinsics.h:68
PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite(float a)
platform-specific finiteness check (not INF or NAN)
Definition: PxUnixIntrinsics.h:127
PX_CUDA_CALLABLE PX_FORCE_INLINE float cos(float a)
platform-specific cosine
Definition: PxUnixIntrinsics.h:109
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxCeil(float a)
Definition: PxMath.h:313
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSqrt(float a)
Square root.
Definition: PxMath.h:144
PX_CUDA_CALLABLE PX_FORCE_INLINE float sin(float a)
platform-specific sine
Definition: PxWindowsIntrinsics.h:99
static const float PxInvPi
Definition: PxMath.h:61
static const float PxInvTwoPi
Definition: PxMath.h:62
PX_CUDA_CALLABLE PX_FORCE_INLINE float abs(float a)
platform-specific absolute value
Definition: PxUnixIntrinsics.h:56
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMin(T a, T b)
The return value is the lesser of the two specified values.
Definition: PxMath.h:86
static const float PxTwoPi
Definition: PxMath.h:60
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxRecipSqrt(float a)
reciprocal square root.
Definition: PxMath.h:156
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxCos(float a)
Cosine of an angle (Unit: Radians)
Definition: PxMath.h:182
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAbs(float a)
abs returns the absolute value of its argument.
Definition: PxMath.h:107
PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxEquals(float a, float b, float eps)
Definition: PxMath.h:112
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMax(T a, T b)
The return value is the greater of the two specified values.
Definition: PxMath.h:70
static const float PxPiDivFour
Definition: PxMath.h:64
PX_CUDA_CALLABLE PX_FORCE_INLINE float cos(float a)
platform-specific cosine
Definition: PxWindowsIntrinsics.h:105
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAsin(float f)
Arcsine. Returns angle between -PI/2 and PI/2 in radians Unit: Radians.
Definition: PxMath.h:216
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxSign(float a)
Definition: PxMath.h:318
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...
Definition: PxMath.h:292
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxFloor(float a)
Definition: PxMath.h:303
PX_CUDA_CALLABLE PX_FORCE_INLINE float abs(float a)
platform-specific absolute value
Definition: PxWindowsIntrinsics.h:51
PX_CUDA_CALLABLE PX_FORCE_INLINE float sin(float a)
platform-specific sine
Definition: PxUnixIntrinsics.h:103
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAcos(float f)
Arccosine. Returns angle between 0 and PI in radians Unit: Radians.
Definition: PxMath.h:236
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAtan(float a)
ArcTangent. Returns angle between -PI/2 and PI/2 in radians Unit: Radians.
Definition: PxMath.h:256
#define PX_CUDA_CALLABLE
Definition: PxPreprocessor.h:460
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxTan(float a)
Tangent of an angle. Unit: Radians.
Definition: PxMath.h:197