Skip to content
This repository was archived by the owner on Dec 19, 2022. It is now read-only.

Commit 33ac725

Browse files
author
Sylvain Bertrand
committed
Merge branch 'hotfix/0.6.1'
2 parents c4ed5e2 + e1a12d0 commit 33ac725

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ apply plugin: 'maven-publish'
1313
apply plugin: 'com.jfrog.bintray'
1414

1515
sourceCompatibility = 1.8
16-
version = '0.6.0'
16+
version = '0.6.1'
1717
group = "us.ihmc"
1818

1919
project.ext.fullVersion = version

src/us/ihmc/euclid/tools/RotationMatrixTools.java

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,9 @@ private static void multiplyImpl(double a00, double a01, double a02, double a10,
272272
c10 = a01 * b00 + a11 * b01 + a21 * b02;
273273
c11 = a01 * b10 + a11 * b11 + a21 * b12;
274274
c12 = a01 * b20 + a11 * b21 + a21 * b22;
275-
// The 3rd column is computed by the cross-product of the 2 other
276-
// c20 = a02 * b00 + a12 * b01 + a22 * b02;
277-
// c21 = a02 * b10 + a12 * b11 + a22 * b12;
278-
// c22 = a02 * b20 + a12 * b21 + a22 * b22;
275+
c20 = a02 * b00 + a12 * b01 + a22 * b02;
276+
c21 = a02 * b10 + a12 * b11 + a22 * b12;
277+
c22 = a02 * b20 + a12 * b21 + a22 * b22;
279278
}
280279
else
281280
{
@@ -285,10 +284,9 @@ private static void multiplyImpl(double a00, double a01, double a02, double a10,
285284
c10 = a01 * b00 + a11 * b10 + a21 * b20;
286285
c11 = a01 * b01 + a11 * b11 + a21 * b21;
287286
c12 = a01 * b02 + a11 * b12 + a21 * b22;
288-
// The 3rd column is computed by the cross-product of the 2 other
289-
// c20 = a02 * b00 + a12 * b10 + a22 * b20;
290-
// c21 = a02 * b01 + a12 * b11 + a22 * b21;
291-
// c22 = a02 * b02 + a12 * b12 + a22 * b22;
287+
c20 = a02 * b00 + a12 * b10 + a22 * b20;
288+
c21 = a02 * b01 + a12 * b11 + a22 * b21;
289+
c22 = a02 * b02 + a12 * b12 + a22 * b22;
292290
}
293291
}
294292
else
@@ -301,10 +299,9 @@ private static void multiplyImpl(double a00, double a01, double a02, double a10,
301299
c10 = a10 * b00 + a11 * b01 + a12 * b02;
302300
c11 = a10 * b10 + a11 * b11 + a12 * b12;
303301
c12 = a10 * b20 + a11 * b21 + a12 * b22;
304-
// The 3rd column is computed by the cross-product of the 2 other
305-
// c20 = a20 * b00 + a21 * b01 + a22 * b02;
306-
// c21 = a20 * b10 + a21 * b11 + a22 * b12;
307-
// c22 = a20 * b20 + a21 * b21 + a22 * b22;
302+
c20 = a20 * b00 + a21 * b01 + a22 * b02;
303+
c21 = a20 * b10 + a21 * b11 + a22 * b12;
304+
c22 = a20 * b20 + a21 * b21 + a22 * b22;
308305
}
309306
else
310307
{
@@ -314,20 +311,12 @@ private static void multiplyImpl(double a00, double a01, double a02, double a10,
314311
c10 = a10 * b00 + a11 * b10 + a12 * b20;
315312
c11 = a10 * b01 + a11 * b11 + a12 * b21;
316313
c12 = a10 * b02 + a11 * b12 + a12 * b22;
317-
// The 3rd column is computed by the cross-product of the 2 other
318-
// c20 = a20 * b00 + a21 * b10 + a22 * b20;
319-
// c21 = a20 * b01 + a21 * b11 + a22 * b21;
320-
// c22 = a20 * b02 + a21 * b12 + a22 * b22;
314+
c20 = a20 * b00 + a21 * b10 + a22 * b20;
315+
c21 = a20 * b01 + a21 * b11 + a22 * b21;
316+
c22 = a20 * b02 + a21 * b12 + a22 * b22;
321317
}
322318
}
323319

324-
// The 3rd column is computed by the cross-product of the 2 other
325-
// So it is 6M and 3A instead of 9M and 6A
326-
// The accuracy is controlled in the test RotationMatrixTest.testNumericalErrors()
327-
c20 = c01 * c12 - c02 * c11;
328-
c21 = c02 * c10 - c00 * c12;
329-
c22 = c00 * c11 - c01 * c10;
330-
331320
matrixToPack.set(c00, c01, c02, c10, c11, c12, c20, c21, c22);
332321
}
333322

test/us/ihmc/euclid/matrix/RotationMatrixTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ public void testNumericalError() throws Exception
10961096
RotationMatrix unnormalized = new RotationMatrix();
10971097
RotationMatrix normalized = new RotationMatrix();
10981098

1099-
for (int i = 0; i < 125000; i++)
1099+
for (int i = 0; i < 269000; i++)
11001100
{
11011101
RotationMatrixReadOnly multiplyWith = EuclidCoreRandomTools.nextRotationMatrix(random);
11021102
unnormalized.multiply(multiplyWith);
@@ -1111,7 +1111,7 @@ public void testNumericalError() throws Exception
11111111
RotationMatrix unnormalized = new RotationMatrix();
11121112
RotationMatrix normalized = new RotationMatrix();
11131113

1114-
for (int i = 0; i < 80000; i++)
1114+
for (int i = 0; i < 116000; i++)
11151115
{
11161116
Quaternion multiplyWith = EuclidCoreRandomTools.nextQuaternion(random);
11171117
unnormalized.append(multiplyWith);
@@ -1126,7 +1126,7 @@ public void testNumericalError() throws Exception
11261126
RotationMatrix unnormalized = new RotationMatrix();
11271127
RotationMatrix normalized = new RotationMatrix();
11281128

1129-
for (int i = 0; i < 125000; i++)
1129+
for (int i = 0; i < 268000; i++)
11301130
{
11311131
AxisAngle multiplyWith = EuclidCoreRandomTools.nextAxisAngle(random);
11321132
unnormalized.append(multiplyWith);

0 commit comments

Comments
 (0)