Index: trunk/psLib/src/astro/psSphereOps.c
===================================================================
--- trunk/psLib/src/astro/psSphereOps.c	(revision 5343)
+++ trunk/psLib/src/astro/psSphereOps.c	(revision 5368)
@@ -8,6 +8,6 @@
  *  @author Dave Robbins, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-15 01:42:46 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-18 22:14:47 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -105,5 +105,5 @@
         out = psSphereAlloc();
     }
-
+    //    double r = -coord->r;
     // apply the transform by creating a new psSphereRot from the input coord
     // and combining it with the input transform (see ADD)
@@ -114,4 +114,5 @@
                                  sin(coord->d),
                                  0.0);
+
     //    psSphereRot* coordQuatConjugate = psSphereRotQuat(
     //                                       coordQuat->q0, coordQuat->q1, coordQuat->q2, coordQuat->q3);
@@ -131,7 +132,7 @@
     psSphereRot *inv = (psSphereRot*)psAlloc(sizeof(psSphereRot));
     *inv = *transform;
-    psSphereRot *result = psSphereRotCombine(NULL, transform, coordQuat);
-    psSphereRotInvert(inv);
-    psSphereRotCombine(result, result, inv);
+    //    psSphereRot *result = psSphereRotCombine(NULL, transform, coordQuat);
+    //    inv = psSphereRotInvert(inv);
+    //    psSphereRotCombine(result, result, inv);
     //    psSphereRot *result = psSphereRotCombine(NULL, inv, coordQuat);
     //    psSphereRotCombine(result, result, transform);
@@ -139,5 +140,11 @@
     //    psSphereRotCombine(result, inv, result);
 
-    //    out->r = atan2(result->q1, result->q0);
+    psSphereRot *result = psSphereRotCombine(NULL, coordQuat, transform);
+    inv = psSphereRotInvert(inv);
+    //    *(psSphereRot**)&transform = psSphereRotInvert( *(psSphereRot**)&transform);
+    result = psSphereRotCombine(result, inv, result);
+    //    *(psSphereRot**)&transform = psSphereRotInvert( *(psSphereRot**)&transform);
+
+    //        out->r = atan2(result->q0, result->q1);
     out->r = atan2(result->q1, result->q0);
     out->d = asin(result->q2);
@@ -198,4 +205,5 @@
     rot->q2 = -rot->q2;
 
+    //    rot->q3 = rot->q3;
     return rot;
 }
