Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
HalfFloatConversion Namespace Reference

Enumerations

enum  ERoundingMode { ROUND_TO_NEG_INF , ROUND_TO_POS_INF , ROUND_TO_NEAREST }
 Define half-float rounding modes. More...
 

Functions

template<int RoundingMode>
HalfFloat FromFloatFallback (float inV)
 Convert a float (32-bits) to a half float (16-bits), fallback version when no intrinsics available. More...
 
template<int RoundingMode>
JPH_INLINE HalfFloat FromFloat (float inV)
 Convert a float (32-bits) to a half float (16-bits) More...
 
Vec4 ToFloatFallback (UVec4Arg inValue)
 Convert 4 half floats (lower 64 bits) to floats, fallback version when no intrinsics available. More...
 
JPH_INLINE Vec4 ToFloat (UVec4Arg inValue)
 Convert 4 half floats (lower 64 bits) to floats. More...
 

Enumeration Type Documentation

◆ ERoundingMode

Define half-float rounding modes.

Enumerator
ROUND_TO_NEG_INF 

Round to negative infinity.

ROUND_TO_POS_INF 

Round to positive infinity.

ROUND_TO_NEAREST 

Round to nearest value.

Function Documentation

◆ FromFloat()

template<int RoundingMode>
JPH_INLINE HalfFloat HalfFloatConversion::FromFloat ( float  inV)

Convert a float (32-bits) to a half float (16-bits)

◆ FromFloatFallback()

template<int RoundingMode>
HalfFloat HalfFloatConversion::FromFloatFallback ( float  inV)
inline

Convert a float (32-bits) to a half float (16-bits), fallback version when no intrinsics available.

◆ ToFloat()

JPH_INLINE Vec4 HalfFloatConversion::ToFloat ( UVec4Arg  inValue)

Convert 4 half floats (lower 64 bits) to floats.

◆ ToFloatFallback()

Vec4 HalfFloatConversion::ToFloatFallback ( UVec4Arg  inValue)
inline

Convert 4 half floats (lower 64 bits) to floats, fallback version when no intrinsics available.