summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/rotation.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-25 14:08:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-25 14:08:22 +0200
commit06687f9777fc7fa4e2bca2b2471af596ab658e9f (patch)
tree1cd01566ed6aaaa8dff20d3738bf99760d29b803 /facetracknoir/rotation.h
parente9927542ae68402ee13828c8d90d7965a2dd99cb (diff)
sprinkle const
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'facetracknoir/rotation.h')
-rw-r--r--facetracknoir/rotation.h4
1 files 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