diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-11-07 14:54:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 14:54:15 +0100 |
commit | 77816fea8bf6d05c749c9724bf1a566454d58aec (patch) | |
tree | 58a728cecde763e690d2b26685e6e43fbba838a8 /core/math/vector3.cpp | |
parent | f0fc28f0fd7a3116483340d1dad5e7b7229337f6 (diff) | |
parent | 218f38c7ecdea970a5e82a48e7782077be4fc248 (diff) | |
download | redot-engine-77816fea8bf6d05c749c9724bf1a566454d58aec.tar.gz |
Merge pull request #32477 from aaronfranke/equal-approx-separate
Make is_equal_approx separate and make == exact again
Diffstat (limited to 'core/math/vector3.cpp')
-rw-r--r-- | core/math/vector3.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index ebc1599820..e3211c8fb1 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -149,6 +149,11 @@ Basis Vector3::to_diagonal_matrix() const { 0, 0, z); } +bool Vector3::is_equal_approx(const Vector3 &p_v) const { + + return Math::is_equal_approx(x, p_v.x) && Math::is_equal_approx(y, p_v.y) && Math::is_equal_approx(z, p_v.z); +} + Vector3::operator String() const { return (rtos(x) + ", " + rtos(y) + ", " + rtos(z)); |