aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/geo_quaternion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/geo_quaternion.cpp')
-rw-r--r--test/geo_quaternion.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp
index 27219db10..1da683c0e 100644
--- a/test/geo_quaternion.cpp
+++ b/test/geo_quaternion.cpp
@@ -245,6 +245,14 @@ template<typename Scalar> void mapQuaternion(void){
// is used to determine whether we can return a coeff by reference or not, which is not enough for Map<const ...>.
//const MCQuaternionUA& cmcq3(mcq3);
//VERIFY( &cmcq3.x() == &mcq3.x() );
+
+ // test cast
+ {
+ Quaternion<float> q1f = mq1.template cast<float>();
+ VERIFY_IS_APPROX(q1f.template cast<Scalar>(),mq1);
+ Quaternion<double> q1d = mq1.template cast<double>();
+ VERIFY_IS_APPROX(q1d.template cast<Scalar>(),mq1);
+ }
}
template<typename Scalar> void quaternionAlignment(void){