summaryrefslogtreecommitdiffstats
path: root/core/math/math_2d.cpp
diff options
context:
space:
mode:
authorTwistedTwigleg <beard.noah@gmail.com>2017-08-11 15:10:05 -0400
committerRémi Verschelde <rverschelde@gmail.com>2017-08-16 17:22:23 +0200
commit00f6c859282bb4dab3f6b4f6c20c44222221ebe9 (patch)
treeab3d2bae1ce8e9661480535a6442c94e5aeafd83 /core/math/math_2d.cpp
parentb1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef (diff)
downloadredot-engine-00f6c859282bb4dab3f6b4f6c20c44222221ebe9.tar.gz
Synchronize parameter names in definition and declaration
Fixes #10244.
Diffstat (limited to 'core/math/math_2d.cpp')
-rw-r--r--core/math/math_2d.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index 52e240ed47..956cfe5258 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -281,22 +281,22 @@ Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, c
}
// slide returns the component of the vector along the given plane, specified by its normal vector.
-Vector2 Vector2::slide(const Vector2 &p_n) const {
+Vector2 Vector2::slide(const Vector2 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(p_n.is_normalized() == false, Vector2());
+ ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector2());
#endif
- return *this - p_n * this->dot(p_n);
+ return *this - p_normal * this->dot(p_normal);
}
-Vector2 Vector2::bounce(const Vector2 &p_n) const {
- return -reflect(p_n);
+Vector2 Vector2::bounce(const Vector2 &p_normal) const {
+ return -reflect(p_normal);
}
-Vector2 Vector2::reflect(const Vector2 &p_n) const {
+Vector2 Vector2::reflect(const Vector2 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(p_n.is_normalized() == false, Vector2());
+ ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector2());
#endif
- return 2.0 * p_n * this->dot(p_n) - *this;
+ return 2.0 * p_normal * this->dot(p_normal) - *this;
}
bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 *r_pos, Point2 *r_normal) const {