From db29a851025201dc530b0bf274a396b80eb18492 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Thu, 25 Oct 2018 09:50:53 -0700 Subject: [PATCH] update vector3::distance_to --- src/core/Vector3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Vector3.cpp b/src/core/Vector3.cpp index a22bdc0b..2f2e45e1 100644 --- a/src/core/Vector3.cpp +++ b/src/core/Vector3.cpp @@ -229,12 +229,12 @@ real_t Vector3::length_squared() const real_t Vector3::distance_squared_to(const Vector3& b) const { - return (b-*this).length(); + return (b-*this).length_squared(); } real_t Vector3::distance_to(const Vector3& b) const { - return (b-*this).length_squared(); + return (b-*this).length(); } real_t Vector3::dot(const Vector3& b) const