|
| JPH_INLINE constexpr float | DegreesToRadians (float inV) |
| | Convert a value from degrees to radians.
|
| |
| JPH_INLINE constexpr float | RadiansToDegrees (float inV) |
| | Convert a value from radians to degrees.
|
| |
| float | CenterAngleAroundZero (float inV) |
| | Convert angle in radians to the range \([-\pi, \pi]\).
|
| |
| template<typename T > |
| JPH_INLINE constexpr T | Clamp (T inV, T inMin, T inMax) |
| | Clamp a value between two values.
|
| |
| template<typename T > |
| JPH_INLINE constexpr T | Square (T inV) |
| | Square a value.
|
| |
| JPH_INLINE float | Sqrt (float inV) |
| | Take the square root of a float value.
|
| |
| JPH_INLINE double | Sqrt (double inV) |
| | Take the square root of a double value.
|
| |
| template<typename T > |
| JPH_INLINE constexpr T | Cubed (T inV) |
| | Returns \(inV^3\).
|
| |
| template<typename T > |
| JPH_INLINE constexpr T | Sign (T inV) |
| | Get the sign of a value.
|
| |
| template<typename T > |
| constexpr bool | IsPowerOf2 (T inV) |
| | Check if inV is a power of 2.
|
| |
| template<typename T > |
| T | AlignUp (T inV, uint64 inAlignment) |
| | Align inV up to the next inAlignment bytes.
|
| |
| template<typename T > |
| bool | IsAligned (T inV, uint64 inAlignment) |
| | Check if inV is inAlignment aligned.
|
| |
| uint | CountTrailingZeros (uint32 inValue) |
| | Compute number of trailing zero bits (how many low bits are zero)
|
| |
| uint | CountLeadingZeros (uint32 inValue) |
| | Compute the number of leading zero bits (how many high bits are zero)
|
| |
| uint | CountBits (uint32 inValue) |
| | Count the number of 1 bits in a value.
|
| |
| uint32 | GetNextPowerOf2 (uint32 inValue) |
| | Get the next higher power of 2 of a value, or the value itself if the value is already a power of 2.
|
| |
| template<class To , class From > |
| JPH_INLINE To | BitCast (const From &inValue) |
| |