summaryrefslogtreecommitdiffstats
path: root/core/math/vector2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/vector2.cpp')
-rw-r--r--core/math/vector2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index df8c804243..74631d3e29 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -162,9 +162,9 @@ Vector2 Vector2::move_toward(const Vector2 &p_to, const real_t p_delta) const {
// slide returns the component of the vector along the given plane, specified by its normal vector.
Vector2 Vector2::slide(const Vector2 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 must be normalized.");
+ ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 " + p_normal.operator String() + "must be normalized.");
#endif
- return *this - p_normal * this->dot(p_normal);
+ return *this - p_normal * dot(p_normal);
}
Vector2 Vector2::bounce(const Vector2 &p_normal) const {
@@ -173,9 +173,9 @@ Vector2 Vector2::bounce(const Vector2 &p_normal) const {
Vector2 Vector2::reflect(const Vector2 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 must be normalized.");
+ ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 " + p_normal.operator String() + "must be normalized.");
#endif
- return 2.0f * p_normal * this->dot(p_normal) - *this;
+ return 2.0f * p_normal * dot(p_normal) - *this;
}
bool Vector2::is_equal_approx(const Vector2 &p_v) const {