summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-23 08:59:26 +0200
committerGitHub <noreply@github.com>2018-08-23 08:59:26 +0200
commit1e729630d6bff3a32751a1850271b080494373ba (patch)
tree14f29a26bb9733b5094a2ec41cf1efa8fe29516c /core/math/vector3.h
parenta2acbb0bfb547f893f9d84cfde4957fdc4791dae (diff)
parent434973fb83ce8add0a235fd5895acaf730857a08 (diff)
downloadredot-engine-1e729630d6bff3a32751a1850271b080494373ba.tar.gz
Merge pull request #21240 from aaronfranke/mono-project-vector
[Mono] Vector2/3 Project methods
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r--core/math/vector3.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index a719e3965d..5f0e8919ff 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -241,7 +241,7 @@ real_t Vector3::distance_squared_to(const Vector3 &p_b) const {
}
Vector3 Vector3::project(const Vector3 &p_b) const {
- return p_b * (dot(p_b) / p_b.dot(p_b));
+ return p_b * (dot(p_b) / p_b.length_squared());
}
real_t Vector3::angle_to(const Vector3 &p_b) const {