Ignore:
Timestamp:
Sep 10, 2011, 4:55:44 PM (11 years ago)
Author:
sam
Message:

core: add our custom isnan() macro to the core headers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/half.cpp

    r937 r940  
    1717#include "core.h"
    1818#include "lol/unit.h"
    19 
    20 /* Ensure isnan() is present even on systems that don't define it, or
    21  * when -ffast-math is being used. */
    22 #if defined __FAST_MATH__
    23 #   undef isnan
    24 #endif
    25 #if !defined isnan
    26 static inline int isnan(float f)
    27 {
    28     union { float f; uint32_t x; } u = { f };
    29     return (u.x << 1) > 0xff000000u;
    30 }
    31 #endif
    3219
    3320namespace lol
Note: See TracChangeset for help on using the changeset viewer.