Synchronize parameter names in definition and declaration
Fixes #10244.
This commit is contained in:
parent
b1ecaaa22b
commit
00f6c85928
134 changed files with 974 additions and 974 deletions
|
|
@ -108,9 +108,9 @@ struct Vector3 {
|
|||
|
||||
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_b) const;
|
||||
|
||||
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_vec) const;
|
||||
_FORCE_INLINE_ Vector3 bounce(const Vector3 &p_vec) const;
|
||||
_FORCE_INLINE_ Vector3 reflect(const Vector3 &p_vec) const;
|
||||
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_normal) const;
|
||||
_FORCE_INLINE_ Vector3 bounce(const Vector3 &p_normal) const;
|
||||
_FORCE_INLINE_ Vector3 reflect(const Vector3 &p_normal) const;
|
||||
|
||||
/* Operators */
|
||||
|
||||
|
|
@ -410,22 +410,22 @@ void Vector3::zero() {
|
|||
}
|
||||
|
||||
// slide returns the component of the vector along the given plane, specified by its normal vector.
|
||||
Vector3 Vector3::slide(const Vector3 &p_n) const {
|
||||
Vector3 Vector3::slide(const Vector3 &p_normal) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V(p_n.is_normalized() == false, Vector3());
|
||||
ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector3());
|
||||
#endif
|
||||
return *this - p_n * this->dot(p_n);
|
||||
return *this - p_normal * this->dot(p_normal);
|
||||
}
|
||||
|
||||
Vector3 Vector3::bounce(const Vector3 &p_n) const {
|
||||
return -reflect(p_n);
|
||||
Vector3 Vector3::bounce(const Vector3 &p_normal) const {
|
||||
return -reflect(p_normal);
|
||||
}
|
||||
|
||||
Vector3 Vector3::reflect(const Vector3 &p_n) const {
|
||||
Vector3 Vector3::reflect(const Vector3 &p_normal) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V(p_n.is_normalized() == false, Vector3());
|
||||
ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector3());
|
||||
#endif
|
||||
return 2.0 * p_n * this->dot(p_n) - *this;
|
||||
return 2.0 * p_normal * this->dot(p_normal) - *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue