mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-27 03:53:24 +00:00
bug fixes
This commit is contained in:
@@ -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);}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user