diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-12-03 14:51:14 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-12-03 14:51:14 +0100 |
commit | 6358599ecbe23a8ba1829dea21e532aa85aab932 (patch) | |
tree | fdb4ca1fa1f87bace7c56cd24dda33cad5d7b561 /test/geo_quaternion.cpp | |
parent | 7745f69013b5e4c93c1ffe6ba3173456d45c7222 (diff) |
Fix QuaternionBase::cast for quaternion map and wrapper.
Diffstat (limited to 'test/geo_quaternion.cpp')
-rw-r--r-- | test/geo_quaternion.cpp | 8 |
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){ |