From 29cfd4ab4f0c1f7eafb976cf84f684abc8443740 Mon Sep 17 00:00:00 2001 From: devZoGok Date: Wed, 1 Apr 2020 15:45:03 +0300 Subject: [PATCH] bug fixes --- vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector.h b/vector.h index b56f544..035d1e2 100755 --- a/vector.h +++ b/vector.h @@ -44,7 +44,7 @@ namespace vb01{ float getLength(){return std::sqrt(getLengthSq());} float dot(Vector3 v){return x*v.x+y*v.y+z*v.z;} float getAngleBetween(Vector3 v){return std::acos(dot(v));} - float getDistanceFrom(Vector3 v){return (v-*this).getLengthSq();} + float getDistanceFrom(Vector3 v){return (v-*this).getLength();} Vector3 norm(){return (*this!=Vector3::VEC_ZERO?*this/getLength():Vector3::VEC_ZERO);} Vector3 cross(Vector3 v){return Vector3(y * v.z - v.y * z, z * v.x - x * v.z, x * v.y - v.x * y);}