Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
qnan.h File Reference

Some utilities for our dealings with qnans. More...

Classes

union  _IEEEDouble
 Data structure to represent the bit pattern of a 64 Bit IEEE 754 floating-point number. More...
 
union  _IEEESingle
 Data structure to represent the bit pattern of a 32 Bit IEEE 754 floating-point number. More...
 

Macros

#define AI_QNAN_H_INCLUDED
 

Functions

AI_FORCE_INLINE ai_real get_qnan ()
 Get a fresh qnan. More...
 
template<class TReal >
AI_FORCE_INLINE bool is_not_qnan (TReal in)
 Check whether a float is NOT qNaN. More...
 
AI_FORCE_INLINE bool is_qnan (double in)
 Check whether a given double is qNaN. More...
 
AI_FORCE_INLINE bool is_qnan (float in)
 Check whether a given float is qNaN. More...
 
AI_FORCE_INLINE bool is_special_float (double in)
 check whether a double is either NaN or (+/-) INF. More...
 
AI_FORCE_INLINE bool is_special_float (float in)
 check whether a float is either NaN or (+/-) INF. More...
 

Detailed Description

Some utilities for our dealings with qnans.

Note
Some loaders use qnans to mark invalid values tempoarily, also Assimp explicitly enforces undefined normals to be set to qnan. qnan utilities are available in standard libraries (C99 for example) but last time I checked compiler coverage was so bad that I decided to reinvent the wheel.

Macro Definition Documentation

◆ AI_QNAN_H_INCLUDED

#define AI_QNAN_H_INCLUDED

Function Documentation

◆ get_qnan()

AI_FORCE_INLINE ai_real get_qnan ( )

Get a fresh qnan.


◆ is_not_qnan()

template<class TReal >
AI_FORCE_INLINE bool is_not_qnan ( TReal  in)

Check whether a float is NOT qNaN.

Parameters
inInput value

◆ is_qnan() [1/2]

AI_FORCE_INLINE bool is_qnan ( double  in)

Check whether a given double is qNaN.

Parameters
inInput value

◆ is_qnan() [2/2]

AI_FORCE_INLINE bool is_qnan ( float  in)

Check whether a given float is qNaN.

Parameters
inInput value

◆ is_special_float() [1/2]

AI_FORCE_INLINE bool is_special_float ( double  in)

check whether a double is either NaN or (+/-) INF.

Denorms return false, they're treated like normal values.

Parameters
inInput value

◆ is_special_float() [2/2]

AI_FORCE_INLINE bool is_special_float ( float  in)

check whether a float is either NaN or (+/-) INF.

Denorms return false, they're treated like normal values.

Parameters
inInput value