Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Trigonometry.h File Reference

Go to the source code of this file.

Functions

JPH_NAMESPACE_BEGIN JPH_INLINE float Sin (float inX)
 Sine of x (input in radians)
 
JPH_INLINE float Cos (float inX)
 Cosine of x (input in radians)
 
JPH_INLINE float Tan (float inX)
 Tangent of x (input in radians)
 
JPH_INLINE float ASin (float inX)
 
JPH_INLINE float ACos (float inX)
 
JPH_INLINE float ACosApproximate (float inX)
 An approximation of ACos, max error is 4.2e-3 over the entire range [-1, 1], is approximately 2.5x faster than ACos.
 
JPH_INLINE float ATan (float inX)
 Arc tangent of x (returns value in the range [-PI / 2, PI / 2])
 
JPH_INLINE float ATan2 (float inY, float inX)
 Arc tangent of y / x using the signs of the arguments to determine the correct quadrant (returns value in the range [-PI, PI])
 

Function Documentation

◆ ACos()

JPH_INLINE float ACos ( float  inX)

Arc cosine of x (returns value in the range [0, PI]) Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::acos

◆ ACosApproximate()

JPH_INLINE float ACosApproximate ( float  inX)

An approximation of ACos, max error is 4.2e-3 over the entire range [-1, 1], is approximately 2.5x faster than ACos.

◆ ASin()

JPH_INLINE float ASin ( float  inX)

Arc sine of x (returns value in the range [-PI / 2, PI / 2]) Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::asin

◆ ATan()

JPH_INLINE float ATan ( float  inX)

Arc tangent of x (returns value in the range [-PI / 2, PI / 2])

◆ ATan2()

JPH_INLINE float ATan2 ( float  inY,
float  inX 
)

Arc tangent of y / x using the signs of the arguments to determine the correct quadrant (returns value in the range [-PI, PI])

◆ Cos()

JPH_INLINE float Cos ( float  inX)

Cosine of x (input in radians)

◆ Sin()

JPH_NAMESPACE_BEGIN JPH_INLINE float Sin ( float  inX)

Sine of x (input in radians)

◆ Tan()

JPH_INLINE float Tan ( float  inX)

Tangent of x (input in radians)