diff options
Diffstat (limited to 'include/core/Vector2.hpp')
-rw-r--r-- | include/core/Vector2.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/Vector2.hpp b/include/core/Vector2.hpp index 2a4c902..b3ef032 100644 --- a/include/core/Vector2.hpp +++ b/include/core/Vector2.hpp @@ -193,8 +193,8 @@ struct Vector2 { return -reflect(p_normal); } - inline Vector2 reflect(const Vector2 &p_vec) const { - return p_vec - *this * this->dot(p_vec) * 2.0; + inline Vector2 reflect(const Vector2 &p_normal) const { + return -(*this - p_normal * this->dot(p_normal) * 2.0); } inline real_t angle() const { |