Simplify code using angularRatesBetweenVectors

This commit is contained in:
Oleg Kalachev
2023-12-13 08:25:11 +03:00
parent 24b62e5145
commit 4fcf2109ce
3 changed files with 9 additions and 10 deletions

View File

@@ -79,7 +79,10 @@ public:
static Vector angularRatesBetweenVectors(const Vector& u, const Vector& v)
{
return cross(u, v);
Vector direction = cross(u, v);
direction.normalize();
float angle = angleBetweenVectors(u, v);
return direction * angle;
}
size_t printTo(Print& p) const {