Commit e0c4f668 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added Visual Studio wrapper for isinf and isnan

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6070 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fdbe936f
//=============================================================================
//
// CLASS GeometryToolsT
//
//
// Author: Henrik Zimmer <henrik@zimmer.to>
//
// Version: $Revision: 1$
// Date: $Date: XX-XX-200X$
//
//=============================================================================
#ifndef VSTOOLS_HH
#define VSTOOLS_HH
//== FORWARDDECLARATIONS ======================================================
//== NAMESPACES ===============================================================
//== DEFINITION =========================================================
/** These functions are required for Visual Studio to work around missing
functions. Basic equivalent functions for doulbe exist in the float
header but are named different. So this wrapper makes them standard compatible.
*/
#ifdef WIN32
#include <float.h>
namespace std {
inline bool isnan(double x)
{
return _isnan(x);
}
inline bool isinf(double x)
{
return !_finite(x);
}
}
#endif
//=============================================================================
#endif // VSTOOLS_HH defined
//=============================================================================
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment