IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8912


Ignore:
Timestamp:
Sep 22, 2006, 5:39:33 PM (20 years ago)
Author:
Paul Price
Message:

Adding PS_ASSERT_FLOAT_REAL to check for NAN, Inf, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psAssert.h

    r8627 r8912  
    143143            "Error: %s, %f, is out of range.  Must be between %f and %f.", \
    144144            #NAME, NAME, LOWER, UPPER); \
     145    return RVAL; \
     146}
     147
     148#define PS_ASSERT_FLOAT_REAL(NAME, RVAL) \
     149if (!finite(NAME)) { \
     150    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
     151            "Error: %s=%fis not a real value.\n", \
     152            #NAME, NAME); \
    145153    return RVAL; \
    146154}
Note: See TracChangeset for help on using the changeset viewer.