aboutsummaryrefslogtreecommitdiff
path: root/test/geo_alignedbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/geo_alignedbox.cpp')
-rw-r--r--test/geo_alignedbox.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp
index 5886f9181..8e36adbe3 100644
--- a/test/geo_alignedbox.cpp
+++ b/test/geo_alignedbox.cpp
@@ -15,6 +15,10 @@
#include<iostream>
using namespace std;
+template<typename T> EIGEN_DONT_INLINE
+void kill_extra_precision(T& x) { eigen_assert(&x != 0); }
+
+
template<typename BoxType> void alignedbox(const BoxType& _box)
{
/* this test covers the following files:
@@ -36,6 +40,10 @@ template<typename BoxType> void alignedbox(const BoxType& _box)
BoxType b0(dim);
BoxType b1(VectorType::Random(dim),VectorType::Random(dim));
BoxType b2;
+
+ kill_extra_precision(b1);
+ kill_extra_precision(p0);
+ kill_extra_precision(p1);
b0.extend(p0);
b0.extend(p1);
@@ -71,7 +79,6 @@ void alignedboxCastTests(const BoxType& _box)
// casting
typedef typename BoxType::Index Index;
typedef typename BoxType::Scalar Scalar;
- typedef typename NumTraits<Scalar>::Real RealScalar;
typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;
const Index dim = _box.dim();
@@ -109,7 +116,7 @@ void specificTest1()
VERIFY_IS_APPROX( 14.0f, box.volume() );
VERIFY_IS_APPROX( 53.0f, box.diagonal().squaredNorm() );
- VERIFY_IS_APPROX( internal::sqrt( 53.0f ), box.diagonal().norm() );
+ VERIFY_IS_APPROX( std::sqrt( 53.0f ), box.diagonal().norm() );
VERIFY_IS_APPROX( m, box.corner( BoxType::BottomLeft ) );
VERIFY_IS_APPROX( M, box.corner( BoxType::TopRight ) );