|
@@ -933,7 +933,7 @@ final public class FastMath {
|
|
|
* Z as up) and stores the results in the store var.
|
|
|
*
|
|
|
* @param sphereCoords the input spherical coordinates: x=distance from
|
|
|
- * origin, y=longitude in radians, z=latitude in radians (not null,
|
|
|
+ * origin, y=latitude in radians, z=longitude in radians (not null,
|
|
|
* unaffected)
|
|
|
* @param store storage for the result (modified if not null)
|
|
|
* @return the Cartesian coordinates (either store or a new vector)
|
|
@@ -943,10 +943,10 @@ final public class FastMath {
|
|
|
if (store == null) {
|
|
|
store = new Vector3f();
|
|
|
}
|
|
|
- store.z = sphereCoords.x * FastMath.sin(sphereCoords.z);
|
|
|
- float a = sphereCoords.x * FastMath.cos(sphereCoords.z);
|
|
|
- store.x = a * FastMath.cos(sphereCoords.y);
|
|
|
- store.y = a * FastMath.sin(sphereCoords.y);
|
|
|
+ store.y = sphereCoords.x * FastMath.sin(sphereCoords.y);
|
|
|
+ float a = sphereCoords.x * FastMath.cos(sphereCoords.y);
|
|
|
+ store.x = a * FastMath.cos(sphereCoords.z);
|
|
|
+ store.z = a * FastMath.sin(sphereCoords.z);
|
|
|
|
|
|
return store;
|
|
|
}
|