From 5d7d955378f67236772f3634f963a8ca7d1016a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 13:26:31 -0300 Subject: [PATCH] AP_Math: Add missing const in member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_Math/quaternion.cpp | 2 +- libraries/AP_Math/quaternion.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Math/quaternion.cpp b/libraries/AP_Math/quaternion.cpp index 403158c74b..946bc97dc5 100644 --- a/libraries/AP_Math/quaternion.cpp +++ b/libraries/AP_Math/quaternion.cpp @@ -464,7 +464,7 @@ void Quaternion::rotate(const Vector3f &v) // convert this quaternion to a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation -void Quaternion::to_axis_angle(Vector3f &v) +void Quaternion::to_axis_angle(Vector3f &v) const { const float l = sqrtf(sq(q2)+sq(q3)+sq(q4)); v = Vector3f(q2,q3,q4); diff --git a/libraries/AP_Math/quaternion.h b/libraries/AP_Math/quaternion.h index 25ca6cf398..0848f11eed 100644 --- a/libraries/AP_Math/quaternion.h +++ b/libraries/AP_Math/quaternion.h @@ -89,7 +89,7 @@ public: // convert this quaternion to a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation - void to_axis_angle(Vector3f &v); + void to_axis_angle(Vector3f &v) const; // create a quaternion from a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation