From ee2219b8368992eb04b314066c616d311c2b312f Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Tue, 17 Oct 2017 08:14:02 +0200 Subject: [PATCH] Quaternion: replace conversion in rotate() with AxisAngle call --- matrix/Quaternion.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix/Quaternion.hpp b/matrix/Quaternion.hpp index f4a859fca9..d98051375c 100644 --- a/matrix/Quaternion.hpp +++ b/matrix/Quaternion.hpp @@ -330,14 +330,12 @@ public: /** * Rotate quaternion from rotation vector - * TODO replace with AxisAngle call * * @param vec rotation vector */ - void rotate(const Vector &vec) + void rotate(const AxisAngle &vec) { - Quaternion res; - res.from_axis_angle(vec); + Quaternion res(vec); (*this) = res * (*this); }