Skip to content

Commit f7e73ce

Browse files
committed
remove vectorTo
1 parent 7be3b92 commit f7e73ce

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

include/units/Vector2D.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,19 +193,6 @@ template <isQuantity T> class Vector2D {
193193
*/
194194
constexpr T magnitude() const { return sqrt(square(this->x) + square(this->y)); }
195195

196-
/**
197-
* @brief difference between two vectors
198-
*
199-
* This function calculates the difference between two vectors
200-
* a.vectorTo(b) = {b.x - a.x, b.y - a.y}
201-
*
202-
* @param other the other vector
203-
* @return Vector2D<T>
204-
*/
205-
constexpr Vector2D<T> vectorTo(const Vector2D<T>& other) const {
206-
return Vector2D<T>(other.x - this->x, other.y - this->y);
207-
}
208-
209196
/**
210197
* @brief the angle between two vectors
211198
*

include/units/Vector3D.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,6 @@ template <isQuantity T> class Vector3D {
220220
*/
221221
constexpr T magnitude() const { return sqrt(square(this->x) + square(this->y) + square(this->z)); }
222222

223-
/**
224-
* @brief difference between two vectors
225-
*
226-
* TODO: figure out if this is even necessary, you could just use the - operator overload
227-
*
228-
* This function calculates the difference between two vectors
229-
* a.vectorTo(b) = {b.x - a.x, b.y - a.y, b.z - a.z}
230-
*
231-
* @param other the other vector
232-
* @return Vector3D<T>
233-
*/
234-
constexpr Vector3D<T> vectorTo(const Vector3D<T>& other) const {
235-
return Vector2D<T>(other.x - this->x, other.y - this->y, other.z - this->z);
236-
}
237-
238223
/**
239224
* @brief the angle between two vectors
240225
*

0 commit comments

Comments
 (0)