core/math/vector2.cpp
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.");
#endif
	return *this - p_normal * this->dot(p_normal);
}
// slide returns the component of the vector along the given plane, specified by its normal vector.
slide returns the component of the vector along the given plane, specified by its normal vector.
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.");
#endif
	return *this - p_normal * this->dot(p_normal);
}
Vector2 Vector2 :: slide ( const Vector2 & p_normal ) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG ( ! p_normal . is_normalized ( ) , Vector2 ( ) , " " ) ; #endif return * this - p_normal * this -> dot ( p_normal ) ; }
slide returns the component of the vector along the given plane, specified by its normal vector.
slide returns the component of the vector along the given plane specified by its normal vector .