Skip to content

Commit

Permalink
remove vectorTo
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Dec 28, 2024
1 parent 7be3b92 commit f7e73ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
13 changes: 0 additions & 13 deletions include/units/Vector2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,6 @@ template <isQuantity T> class Vector2D {
*/
constexpr T magnitude() const { return sqrt(square(this->x) + square(this->y)); }

/**
* @brief difference between two vectors
*
* This function calculates the difference between two vectors
* a.vectorTo(b) = {b.x - a.x, b.y - a.y}
*
* @param other the other vector
* @return Vector2D<T>
*/
constexpr Vector2D<T> vectorTo(const Vector2D<T>& other) const {
return Vector2D<T>(other.x - this->x, other.y - this->y);
}

/**
* @brief the angle between two vectors
*
Expand Down
15 changes: 0 additions & 15 deletions include/units/Vector3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,6 @@ template <isQuantity T> class Vector3D {
*/
constexpr T magnitude() const { return sqrt(square(this->x) + square(this->y) + square(this->z)); }

/**
* @brief difference between two vectors
*
* TODO: figure out if this is even necessary, you could just use the - operator overload
*
* This function calculates the difference between two vectors
* a.vectorTo(b) = {b.x - a.x, b.y - a.y, b.z - a.z}
*
* @param other the other vector
* @return Vector3D<T>
*/
constexpr Vector3D<T> vectorTo(const Vector3D<T>& other) const {
return Vector2D<T>(other.x - this->x, other.y - this->y, other.z - this->z);
}

/**
* @brief the angle between two vectors
*
Expand Down

0 comments on commit f7e73ce

Please sign in to comment.