Changeset 5450 for trunk/psLib/test/astro/tst_psSphereOps.c
- Timestamp:
- Oct 27, 2005, 4:25:22 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psSphereOps.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psSphereOps.c
r5446 r5450 6 6 * @author d-Rob, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10-2 6 01:20:15$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-28 02:25:22 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 double q3 = cos(a3)*cos(DELTA_P/2); 72 72 73 if ( FLT_EPSILON < fabs(q0 - myST->q0)) {73 if (DBL_EPSILON < fabs(q0 - myST->q0)) { 74 74 psError(PS_ERR_UNKNOWN,true,"myST->q0 is %lf, should be %lf\n", myST->q0, q0); 75 75 return 2; 76 76 } 77 if ( FLT_EPSILON < fabs(q1 - myST->q1)) {77 if (DBL_EPSILON < fabs(q1 - myST->q1)) { 78 78 psError(PS_ERR_UNKNOWN,true,"myST->q1 is %f, should be %f\n", myST->q1, q1); 79 79 return 3; 80 80 } 81 if ( FLT_EPSILON < fabs(q2 - myST->q2)) {81 if (DBL_EPSILON < fabs(q2 - myST->q2)) { 82 82 psError(PS_ERR_UNKNOWN,true,"myST->q2 is %f, should be %f\n", myST->q2, q2); 83 83 return 4; 84 84 } 85 if ( FLT_EPSILON < fabs(q3 - myST->q3)) {85 if (DBL_EPSILON < fabs(q3 - myST->q3)) { 86 86 psError(PS_ERR_UNKNOWN,true,"myST->q0 is %f, should be %f\n", myST->q3, q3); 87 87 return 5; … … 239 239 240 240 // check ecliptic transforms for correctness 241 if ( abs(RAD_TO_DEG(ecliptic->r) - lambda[x]) > TOLERANCE ||242 abs(RAD_TO_DEG(ecliptic->d) - beta[x]) > TOLERANCE) {241 if (fabs(RAD_TO_DEG(ecliptic->r) - lambda[x]) > TOLERANCE || 242 fabs(RAD_TO_DEG(ecliptic->d) - beta[x]) > TOLERANCE) { 243 243 psError(PS_ERR_UNKNOWN, false, 244 244 "Ecliptic tranformation incorrect. Result is (%g,%g), expected (%g,%g)", … … 247 247 return 1; 248 248 } 249 if ( abs(RAD_TO_DEG(icrsFromEcliptic->r) - alpha[x]) > TOLERANCE ||250 abs(RAD_TO_DEG(icrsFromEcliptic->d) - delta[x]) > TOLERANCE) {249 if (fabs(RAD_TO_DEG(icrsFromEcliptic->r) - alpha[x]) > TOLERANCE || 250 fabs(RAD_TO_DEG(icrsFromEcliptic->d) - delta[x]) > TOLERANCE) { 251 251 psError(PS_ERR_UNKNOWN, false, 252 252 "ICRS for Ecliptic tranformation incorrect. Result is (%g,%g), expected (%g,%g)", … … 269 269 270 270 // check ecliptic transforms for correctness 271 if ( abs(RAD_TO_DEG(galactic->r) - l[x]) > TOLERANCE ||272 abs(RAD_TO_DEG(galactic->d) - b[x]) > TOLERANCE) {271 if (fabs(RAD_TO_DEG(galactic->r) - l[x]) > TOLERANCE || 272 fabs(RAD_TO_DEG(galactic->d) - b[x]) > TOLERANCE) { 273 273 psError(PS_ERR_UNKNOWN, false, 274 274 "Galactic tranformation incorrect. Result is (%g,%g), expected (%g,%g)", … … 280 280 return 3; 281 281 } 282 if ( abs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE ||283 abs(RAD_TO_DEG(icrsFromGalactic->d) - delta[x]) > TOLERANCE) {282 if (fabs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE || 283 fabs(RAD_TO_DEG(icrsFromGalactic->d) - delta[x]) > TOLERANCE) { 284 284 psError(PS_ERR_UNKNOWN, false, 285 285 "ICRS for Galactic tranformation incorrect. Result is (%g,%g), expected (%g,%g)", … … 498 498 output->d *= -1.0; 499 499 empty = psSphereGetOffset(origin, output, PS_LINEAR, PS_RADIAN); 500 if ( fabs(offset->r - empty->r) > 0.0001 || fabs(offset->d - empty->r) > 0.0001 ) {500 if ( fabs(offset->r - empty->r) > 0.0001 || abs(offset->d - empty->r) > 0.0001 ) { 501 501 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 502 502 "psSphereGetOffset failed to return correct linear offset values.\n");
Note:
See TracChangeset
for help on using the changeset viewer.
