Files
assimp/code/qnan.h
aramis_acg 6557c28ef7 FIX: NFF face winding bug (actually it was in StandardShapes.cpp).
FIX: StandardShapes::MakeCone() - face order was incorrect in 50% of all cases.
Implemented StandardShapes::MakeCircle().
Fixed a compiler warning in B3DImporter.cpp.
Modified cone.nff - one texture isn't found, that's ok. The mapping should be better visible now.


git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@299 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-01-15 19:22:29 +00:00

41 lines
983 B
C

#if (!defined AI_QNAN_H_INCLUDED)
#define AI_QNAN_H_INCLUDED
// Data structure for a 32 Bit IEEE 754 floating-point number
union _IEEESingle
{
float Float;
struct
{
uint32_t Frac : 23;
uint32_t Exp : 8;
uint32_t Sign : 1;
} IEEE;
} ;
// ---------------------------------------------------------------------------
// check whether a float is NaN
AI_FORCE_INLINE bool is_qnan(float in)
{
return (in != in);
}
// ---------------------------------------------------------------------------
// check whether a float is NOT NaN.
AI_FORCE_INLINE bool is_not_qnan(float in)
{
return (in == in);
}
// ---------------------------------------------------------------------------
// check whether a float is either NaN or (+/-) INF. Denorms return false,
// they're treated like normal values.
AI_FORCE_INLINE bool is_special_float(float in)
{
return (((_IEEESingle*)&in)->IEEE.Exp == (1u << 8)-1);
}
#endif // !! AI_QNAN_H_INCLUDED