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);}