IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2004, 11:25:52 AM (22 years ago)
Author:
gusciora
Message:

Added parameter checking for psFunctions.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psConstants.h

    r2217 r2218  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 21:06:30 $
     8 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 21:25:52 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636}
    3737
     38#define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \
     39if ((NAME1 - NAME2) < -FLT_EPSILON) { \
     40    psError(__func__,"%s is less than %s.", #NAME1, #NAME2); \
     41    return(RVAL); \
     42}
     43
    3844
    3945
     
    5460}
    5561
     62#define PS_PTR_CHECK_SIZE_EQUAL(PTR1, PTR2, RVAL) \
     63if (PTR1->n != PTR2->n) { \
     64    psError(__func__,"ptr %s has size %d, ptr %s has size %d.", #PTR1, PTR1->n, #PTR2, PTR2->n); \
     65    return(RVAL); \
     66}
     67
     68#define PS_PTR_CHECK_TYPE_EQUAL(PTR1, PTR2, RVAL) \
     69if (PTR1->type.type != PTR2->type.type) { \
     70    psError(__func__,"ptr %s has type %d, ptr %s has type %d.", #PTR1, PTR1->type.type, #PTR2, PTR2->type.type); \
     71    return(RVAL); \
     72}
    5673
    5774
Note: See TracChangeset for help on using the changeset viewer.