Changeset 5813 for trunk/psLib/src/astro/psCoord.c
- Timestamp:
- Dec 19, 2005, 1:58:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r5682 r5813 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.9 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-12- 05 21:33:29$12 * @version $Revision: 1.97 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-12-19 23:58:47 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 61 61 should rename this. 62 62 63 XXX: Use the ADD version which is based on determinants.64 65 63 XXX: This code no longer makes sense. The merge must be reviewed. 66 64 *****************************************************************************/ … … 85 83 86 84 if (0) { 87 //This is sample code from IfA. It didn't work initially, and I did not 88 //spend any time debugging it. 89 psF64 a = transform->x->coeff[1][0]; 90 psF64 b = transform->x->coeff[0][1]; 91 psF64 c = transform->y->coeff[1][0]; 92 psF64 d = transform->y->coeff[0][1]; 93 psF64 e = transform->x->coeff[0][0]; 94 psF64 f = transform->y->coeff[0][0]; 95 96 psF64 invDet = 1.0 / (a * d - b * c); // Inverse of the determinant 97 98 // Not entirely sure why this works, but it appears to do so 99 out->x->coeff[1][0] = invDet * a; 100 out->x->coeff[0][1] = - invDet * b; 101 out->y->coeff[1][0] = - invDet * c; 102 out->y->coeff[0][1] = invDet * d; 103 104 out->x->coeff[0][0] = - invDet * (d * e + c * f); 105 out->y->coeff[0][0] = - invDet * (b * e + a * f); 106 } 107 108 if (1) { 109 // XXX: There is no reason to execute this code and the following code. 85 // XXX: Get rid of this code. 110 86 psF64 A = transform->x->coeff[1][0]; 111 87 psF64 B = transform->x->coeff[0][1]; … … 129 105 } 130 106 131 132 // XXX: There is no reason to execute this code and the previous codes.133 // unless the cross terms are available, set these matrix elements to 0134 107 psF64 r12 = 0.0; 135 108 if (transform->x->nY == 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
