From 8fcefb59b1dd4ad0630227f529bda40d274de09c Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 21 Apr 2021 16:43:30 +0900 Subject: [PATCH] AP_Math: add Vector2f::dot --- libraries/AP_Math/vector2.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Math/vector2.h b/libraries/AP_Math/vector2.h index 35a61d5687..152da15989 100644 --- a/libraries/AP_Math/vector2.h +++ b/libraries/AP_Math/vector2.h @@ -89,6 +89,11 @@ struct Vector2 // dot product T operator *(const Vector2 &v) const; + // dot product (same as above but a more easily understood name) + T dot(const Vector2 &v) const { + return *this * v; + } + // cross product T operator %(const Vector2 &v) const;