1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Synchronize parameter names in definition and declaration

Fixes #10244.
This commit is contained in:
TwistedTwigleg
2017-08-11 15:10:05 -04:00
committed by Rémi Verschelde
parent b1ecaaa22b
commit 00f6c85928
134 changed files with 974 additions and 974 deletions

View File

@@ -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 {