aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/geometry.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-08-22 17:48:36 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-08-22 17:48:36 +0000
commitf0394edfa7d063e37256e673cdecacd9f55f44ae (patch)
treea2e36374f3f51fc74f0d64c403f4368c8ae55d54 /test/geometry.cpp
parenta95c1e190b6963543950f4b7831fcc0b844bd95f (diff)
* bugfix in SolveTriangular found by Timothy Hunter (did not compiled for very small fixed size matrices)
* bugfix in Dot unroller * added special random generator for the unit tests and reduced the tolerance threshold by an order of magnitude this fixes issues with sum.cpp but other tests still failed sometimes, this have to be carefully checked...
Diffstat (limited to 'test/geometry.cpp')
-rw-r--r--test/geometry.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/geometry.cpp b/test/geometry.cpp
index 2aad9dda3..8c4752d5d 100644
--- a/test/geometry.cpp
+++ b/test/geometry.cpp
@@ -42,10 +42,10 @@ template<typename Scalar> void geometry(void)
typedef AngleAxis<Scalar> AngleAxis;
Quaternion q1, q2;
- Vector3 v0 = Vector3::Random(),
- v1 = Vector3::Random(),
- v2 = Vector3::Random();
- Vector2 u0 = Vector2::Random();
+ Vector3 v0 = test_random_matrix<Vector3>(),
+ v1 = test_random_matrix<Vector3>(),
+ v2 = test_random_matrix<Vector3>();
+ Vector2 u0 = test_random_matrix<Vector2>();
Matrix3 matrot1;
Scalar a = ei_random<Scalar>(-M_PI, M_PI);
@@ -121,7 +121,7 @@ template<typename Scalar> void geometry(void)
t1.setIdentity();
t1.linear() = q1.toRotationMatrix();
- v0 << 50, 2, 1;//= Vector3::Random().cwiseProduct(Vector3(10,2,0.5));
+ v0 << 50, 2, 1;//= test_random_matrix<Vector3>().cwiseProduct(Vector3(10,2,0.5));
t0.scale(v0);
t1.prescale(v0);
@@ -145,8 +145,8 @@ template<typename Scalar> void geometry(void)
// 2D transformation
Transform2 t20, t21;
- Vector2 v20 = Vector2::Random();
- Vector2 v21 = Vector2::Random();
+ Vector2 v20 = test_random_matrix<Vector2>();
+ Vector2 v21 = test_random_matrix<Vector2>();
t21.setIdentity();
t21.linear() = Rotation2D<Scalar>(a).toRotationMatrix();
VERIFY_IS_APPROX(t20.fromPositionOrientationScale(v20,a,v21).matrix(),
@@ -161,6 +161,6 @@ void test_geometry()
{
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST( geometry<float>() );
-// CALL_SUBTEST( geometry<double>() );
+ CALL_SUBTEST( geometry<double>() );
}
}