Files
assimp/code/qnan.h
aramis_acg 1db46c242f Added temporary boost workaround - some assimp features work with reduced functionality in this case.
Added AC-loader, WIP version.
PLY loader is now able to load models from blender, test model added. Refactoring.
Added FindInvalidData step.
Added support for precompiled headers, the release builds in VC8 are configued to use PCH now.
Added separate makefile for mingw, no -FPic warning anymore, -clear works now.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@176 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-10-13 16:45:48 +00:00

42 lines
929 B
C

#if (!defined AI_QNAN_H_INCLUDED)
#define AI_QNAN_H_INCLUDED
// ---------------------------------------------------------------------------
// 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)
{
union IEEESingle
{
float Float;
struct
{
uint32_t Frac : 23;
uint32_t Exp : 8;
uint32_t Sign : 1;
} IEEE;
} f;
f.Float = in;
return (f.IEEE.Exp == (1u << 8)-1);
}
#endif // !! AI_QNAN_H_INCLUDED