ezEngine  Release 25.03
ezFloat16 Class Reference

A 16 bit IEEE float class. Often called "half". More...

#include <Float16.h>

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
 ezFloat16 ()=default
 Default constructor does not initialize the value.
 
 ezFloat16 (float f)
 Create float16 from float.
 
void operator= (float f)
 Create float16 from float.
 
void SetRawData (ezUInt16 uiData)
 Create float16 from raw data.
 
ezUInt16 GetRawData () const
 Returns the raw 16 Bit data.
 
 operator float () const
 Convert float16 to float.
 
bool operator== (const ezFloat16 &c2)
 Returns true, if both values are identical.
 
bool operator!= (const ezFloat16 &c2)
 Returns true, if both values are not identical.
 

Detailed Description

A 16 bit IEEE float class. Often called "half".

This class only contains functions to convert between float and float16. It does not support any mathematical operations. It is only intended for conversion, always do all mathematical operations on regular floats (or let the GPU do them on halfs).


The documentation for this class was generated from the following files: