AP_Math: add Vector2f::dot

This commit is contained in:
Randy Mackay 2021-04-21 16:43:30 +09:00
parent 23f8a00619
commit 8fcefb59b1
1 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,11 @@ struct Vector2
// dot product
T operator *(const Vector2<T> &v) const;
// dot product (same as above but a more easily understood name)
T dot(const Vector2<T> &v) const {
return *this * v;
}
// cross product
T operator %(const Vector2<T> &v) const;