You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Mono] Vector2/3 Project methods
This commit is contained in:
@@ -122,7 +122,7 @@ Vector2 Vector2::rotated(real_t p_by) const {
|
||||
}
|
||||
|
||||
Vector2 Vector2::project(const Vector2 &p_b) const {
|
||||
return p_b * (dot(p_b) / p_b.dot(p_b));
|
||||
return p_b * (dot(p_b) / p_b.length_squared());
|
||||
}
|
||||
|
||||
Vector2 Vector2::snapped(const Vector2 &p_by) const {
|
||||
|
||||
Reference in New Issue
Block a user