From aa03afafa75ee66b636c5eb762ed7f44dd656eaf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 22 Jun 2021 15:51:34 +1000 Subject: [PATCH] AP_Math: added matrix3 tofloat and todouble --- libraries/AP_Math/matrix3.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_Math/matrix3.h b/libraries/AP_Math/matrix3.h index 80c19c3045..e3dae99946 100644 --- a/libraries/AP_Math/matrix3.h +++ b/libraries/AP_Math/matrix3.h @@ -265,6 +265,13 @@ public: // normalize a rotation matrix void normalize(void); + + Matrix3 todouble(void) const { + return Matrix3(a.todouble(), b.todouble(), c.todouble()); + } + Matrix3 tofloat(void) const { + return Matrix3(a.tofloat(), b.tofloat(), c.tofloat()); + } }; typedef Matrix3 Matrix3i;