diff options
| author | Aaron Franke <arnfranke@yahoo.com> | 2018-08-22 13:27:35 -0400 |
|---|---|---|
| committer | Aaron Franke <arnfranke@yahoo.com> | 2018-08-22 13:27:35 -0400 |
| commit | 434973fb83ce8add0a235fd5895acaf730857a08 (patch) | |
| tree | 55c44630995d6aec68c09b79bd2fa2845ec052b6 /core/math/vector2.cpp | |
| parent | 334acc017ff1f89c05a8c9dc362c584bc843c182 (diff) | |
| download | redot-engine-434973fb83ce8add0a235fd5895acaf730857a08.tar.gz | |
[Mono] Vector2/3 Project methods
Diffstat (limited to 'core/math/vector2.cpp')
| -rw-r--r-- | core/math/vector2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp index 75d9b8b311..84c9f0fca6 100644 --- a/core/math/vector2.cpp +++ b/core/math/vector2.cpp @@ -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 { |
