From 06687f9777fc7fa4e2bca2b2471af596ab658e9f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 25 Oct 2013 14:08:15 +0200 Subject: sprinkle const Signed-off-by: Stanislaw Halik --- facetracknoir/rotation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/facetracknoir/rotation.h b/facetracknoir/rotation.h index 747a23f9..22f35abb 100644 --- a/facetracknoir/rotation.h +++ b/facetracknoir/rotation.h @@ -39,14 +39,14 @@ public: d = cos_phi*cos_the*sin_psi - sin_phi*sin_the*cos_psi; } - void toEuler(double& yaw, double& pitch, double& roll) + void toEuler(double& yaw, double& pitch, double& roll) const { roll = atan2(2.0*(a*b + c*d), 1.0 - 2.0*(b*b + c*c)); pitch = asin(2.0*(a*c - b*d)); yaw = atan2(2.0*(a*d + b*c), 1.0 - 2.0*(c*c + d*d)); } - const RotationType operator*(const RotationType& B) + const RotationType operator*(const RotationType& B) const { const RotationType& A = *this; return RotationType(A.a*B.a - A.b*B.b - A.c*B.c - A.d*B.d, // quaternion multiplication -- cgit v1.2.3