AP_Math: added matrix3 tofloat and todouble

This commit is contained in:
Andrew Tridgell 2021-06-22 15:51:34 +10:00
parent 214d9ad0f8
commit f45ef772f3
1 changed files with 7 additions and 0 deletions

View File

@ -265,6 +265,13 @@ public:
// normalize a rotation matrix // normalize a rotation matrix
void normalize(void); void normalize(void);
Matrix3<double> todouble(void) const {
return Matrix3<double>(a.todouble(), b.todouble(), c.todouble());
}
Matrix3<float> tofloat(void) const {
return Matrix3<float>(a.tofloat(), b.tofloat(), c.tofloat());
}
}; };
typedef Matrix3<int16_t> Matrix3i; typedef Matrix3<int16_t> Matrix3i;