Assimp  v3.1.1 (June 2014)
qnan.h File Reference

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

Classes

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

Functions

AI_FORCE_INLINE float get_qnan ()
 Get a fresh qnan. More...
 
AI_FORCE_INLINE bool is_not_qnan (float in)
 Check whether a float is NOT 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 (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.

Function Documentation

AI_FORCE_INLINE float get_qnan ( )

Get a fresh qnan.

AI_FORCE_INLINE bool is_not_qnan ( float  in)

Check whether a float is NOT qNaN.

Parameters
inInput value
AI_FORCE_INLINE bool is_qnan ( float  in)

Check whether a given float is qNaN.

Parameters
inInput value
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