Changeset 6186 for trunk/psLib/src/math/psConstants.h
- Timestamp:
- Jan 23, 2006, 12:25:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psConstants.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psConstants.h
r5588 r6186 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.8 1$ $Name: not supported by cvs2svn $9 * @date $Date: 200 5-11-23 23:54:43$8 * @version $Revision: 1.82 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-01-23 22:25:31 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 14 14 * called with complex expressions. 15 15 * 16 * XXX: All functions which use the PS_ CHECKmacros must be scrutinized so16 * XXX: All functions which use the PS_ASSERT macros must be scrutinized so 17 17 * that we ensure that an argument which is expected to be output is 18 18 * psFree'ed before reurning NULL. … … 21 21 * throw a psError if the CONDITION is true. However, some throw the error 22 22 * if the CONDITION is false. This should be consistant. 23 *24 * XXX: rename all these with form PS_ASSERT_CONDITION().25 23 * 26 24 */ … … 156 154 } 157 155 158 // Produce an error if (NAME1 > NAME2)159 // XXX: Get rid of this, use above macros.160 #define PS_INT_COMPARE(NAME1, NAME2, RVAL) \161 if ((NAME1) > (NAME2)) { \162 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \163 "Error: (%s > %s) (%d %d).", \164 #NAME1, #NAME2, NAME1, NAME2); \165 return(RVAL); \166 }167 168 // Produce an error if ((NAME1 > NAME2)169 // XXX: Get rid of this, use above macros.170 #define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \171 if ((NAME1) > (NAME2)) { \172 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \173 "Error: (%s > %s) (%f %f)", \174 #NAME1, #NAME2, NAME1, NAME2); \175 return(RVAL); \176 }177 178 156 #define PS_ASSERT_FLOAT_NON_EQUAL(NAME1, NAME2, RVAL) \ 179 157 if (fabs((NAME2) - (NAME1)) < FLT_EPSILON) { \
Note:
See TracChangeset
for help on using the changeset viewer.
