From c3feb166154574138e0b3bea219693751fe89d6b Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Tue, 27 Feb 2007 20:22:32 +0000 Subject: [PATCH] added the geometry package from Mantissa git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@512380 13f79535-47bb-0310-9956-ffa450edef68 --- .../math}/geometry/CardanEulerSingularityException.java | 8 ++++---- .../math}/geometry/NotARotationMatrixException.java | 6 +++--- .../org/apache/commons/math}/geometry/Rotation.java | 2 +- .../org/apache/commons/math}/geometry/RotationOrder.java | 2 +- .../org/apache/commons/math}/geometry/Vector3D.java | 2 +- .../org/apache/commons/math}/geometry/RotationTest.java | 8 +++++++- .../org/apache/commons/math}/geometry/Vector3DTest.java | 4 +++- 7 files changed, 20 insertions(+), 12 deletions(-) rename src/{mantissa/src/org/spaceroots/mantissa => java/org/apache/commons/math}/geometry/CardanEulerSingularityException.java (91%) rename src/{mantissa/src/org/spaceroots/mantissa => java/org/apache/commons/math}/geometry/NotARotationMatrixException.java (92%) rename src/{mantissa/src/org/spaceroots/mantissa => java/org/apache/commons/math}/geometry/Rotation.java (99%) rename src/{mantissa/src/org/spaceroots/mantissa => java/org/apache/commons/math}/geometry/RotationOrder.java (99%) rename src/{mantissa/src/org/spaceroots/mantissa => java/org/apache/commons/math}/geometry/Vector3D.java (99%) rename src/{mantissa/tests-src/org/spaceroots/mantissa => test/org/apache/commons/math}/geometry/RotationTest.java (97%) rename src/{mantissa/tests-src/org/spaceroots/mantissa => test/org/apache/commons/math}/geometry/Vector3DTest.java (97%) diff --git a/src/mantissa/src/org/spaceroots/mantissa/geometry/CardanEulerSingularityException.java b/src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java similarity index 91% rename from src/mantissa/src/org/spaceroots/mantissa/geometry/CardanEulerSingularityException.java rename to src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java index d1b910adf..315a4be01 100644 --- a/src/mantissa/src/org/spaceroots/mantissa/geometry/CardanEulerSingularityException.java +++ b/src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; -import org.spaceroots.mantissa.MantissaException; +import org.apache.commons.math.MathException; /** This class represents exceptions thrown while extractiong Cardan * or Euler angles from a rotation. @@ -28,7 +28,7 @@ import org.spaceroots.mantissa.MantissaException; */ public class CardanEulerSingularityException - extends MantissaException { + extends MathException { /** Simple constructor. * build an exception with a default message. @@ -36,7 +36,7 @@ public class CardanEulerSingularityException * if false it is related to EulerAngles */ public CardanEulerSingularityException(boolean isCardan) { - super(isCardan ? "Cardan angles singularity" : "Euler angles singularity"); + super(isCardan ? "Cardan angles singularity" : "Euler angles singularity", new Object[0]); } private static final long serialVersionUID = -1360952845582206770L; diff --git a/src/mantissa/src/org/spaceroots/mantissa/geometry/NotARotationMatrixException.java b/src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java similarity index 92% rename from src/mantissa/src/org/spaceroots/mantissa/geometry/NotARotationMatrixException.java rename to src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java index 71018f2cb..dbebbfa76 100644 --- a/src/mantissa/src/org/spaceroots/mantissa/geometry/NotARotationMatrixException.java +++ b/src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java @@ -15,9 +15,9 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; -import org.spaceroots.mantissa.MantissaException; +import org.apache.commons.math.MathException; /** This class represents exceptions thrown while building rotations * from matrices. @@ -28,7 +28,7 @@ import org.spaceroots.mantissa.MantissaException; */ public class NotARotationMatrixException - extends MantissaException { + extends MathException { /** Simple constructor. * Build an exception by translating and formating a message diff --git a/src/mantissa/src/org/spaceroots/mantissa/geometry/Rotation.java b/src/java/org/apache/commons/math/geometry/Rotation.java similarity index 99% rename from src/mantissa/src/org/spaceroots/mantissa/geometry/Rotation.java rename to src/java/org/apache/commons/math/geometry/Rotation.java index 309e35653..f71ea9a98 100644 --- a/src/mantissa/src/org/spaceroots/mantissa/geometry/Rotation.java +++ b/src/java/org/apache/commons/math/geometry/Rotation.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; import java.io.Serializable; diff --git a/src/mantissa/src/org/spaceroots/mantissa/geometry/RotationOrder.java b/src/java/org/apache/commons/math/geometry/RotationOrder.java similarity index 99% rename from src/mantissa/src/org/spaceroots/mantissa/geometry/RotationOrder.java rename to src/java/org/apache/commons/math/geometry/RotationOrder.java index fe578a5ce..2ce36f145 100644 --- a/src/mantissa/src/org/spaceroots/mantissa/geometry/RotationOrder.java +++ b/src/java/org/apache/commons/math/geometry/RotationOrder.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; /** * This class is a utility representing a rotation order specification diff --git a/src/mantissa/src/org/spaceroots/mantissa/geometry/Vector3D.java b/src/java/org/apache/commons/math/geometry/Vector3D.java similarity index 99% rename from src/mantissa/src/org/spaceroots/mantissa/geometry/Vector3D.java rename to src/java/org/apache/commons/math/geometry/Vector3D.java index e1b3c0723..707d9bff3 100644 --- a/src/mantissa/src/org/spaceroots/mantissa/geometry/Vector3D.java +++ b/src/java/org/apache/commons/math/geometry/Vector3D.java @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; import java.io.Serializable; diff --git a/src/mantissa/tests-src/org/spaceroots/mantissa/geometry/RotationTest.java b/src/test/org/apache/commons/math/geometry/RotationTest.java similarity index 97% rename from src/mantissa/tests-src/org/spaceroots/mantissa/geometry/RotationTest.java rename to src/test/org/apache/commons/math/geometry/RotationTest.java index 512ce8f30..e2887218e 100644 --- a/src/mantissa/tests-src/org/spaceroots/mantissa/geometry/RotationTest.java +++ b/src/test/org/apache/commons/math/geometry/RotationTest.java @@ -15,7 +15,13 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; + +import org.apache.commons.math.geometry.CardanEulerSingularityException; +import org.apache.commons.math.geometry.NotARotationMatrixException; +import org.apache.commons.math.geometry.Rotation; +import org.apache.commons.math.geometry.RotationOrder; +import org.apache.commons.math.geometry.Vector3D; import junit.framework.*; diff --git a/src/mantissa/tests-src/org/spaceroots/mantissa/geometry/Vector3DTest.java b/src/test/org/apache/commons/math/geometry/Vector3DTest.java similarity index 97% rename from src/mantissa/tests-src/org/spaceroots/mantissa/geometry/Vector3DTest.java rename to src/test/org/apache/commons/math/geometry/Vector3DTest.java index 5fa7f1010..f95aa1d5b 100644 --- a/src/mantissa/tests-src/org/spaceroots/mantissa/geometry/Vector3DTest.java +++ b/src/test/org/apache/commons/math/geometry/Vector3DTest.java @@ -15,7 +15,9 @@ // specific language governing permissions and limitations // under the License. -package org.spaceroots.mantissa.geometry; +package org.apache.commons.math.geometry; + +import org.apache.commons.math.geometry.Vector3D; import junit.framework.*;