Skip to content

Commit

Permalink
remove 2D cross product
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Dec 28, 2024
1 parent 9e9bc7d commit 7e8ed95
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions include/units/Vector2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,6 @@ template <isQuantity T> class Vector2D {
return (x * other.x) + (y * other.y);
}

/**
* @brief cross product of 2 Vector2D objects
*
* This function calculates the cross product of two vectors
* a.cross(b) = (a.x * b.y) - (a.y * b.x)
*
* @tparam Q the type of quantity to use for the other vector
* @tparam R the type of quantity to use for the result
* @param other the vector to calculate the cross product with
* @return R the cross product
*/
template <isQuantity Q, isQuantity R = Multiplied<T, Q>> constexpr R cross(const Vector2D<Q>& other) const {
return (x * other.y) - (y * other.x);
}

/**
* @brief angle of the vector
*
Expand Down

0 comments on commit 7e8ed95

Please sign in to comment.