summaryrefslogtreecommitdiff
path: root/src/util/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/vector.h')
-rw-r--r--src/util/vector.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/vector.h b/src/util/vector.h
index 314131c..d492e8d 100644
--- a/src/util/vector.h
+++ b/src/util/vector.h
@@ -142,6 +142,8 @@ inline F32 vec_cross( VEC2 v1, VEC2 v2 ) { return v1.x * v2.y - v1.y * v2.x; }
inline F32 vec_distsq( VEC3 v1, VEC3 v2 ) { return vec_lensq( v1 - v2 ); }
inline F32 vec_dist( VEC3 v1, VEC3 v2 ) { return sqrtf( vec_distsq( v1, v2 ) ); }
+inline F32 vec_dist2dsq( VEC3 v1, VEC3 v2 ) { return vec_lensq( v1 - v2 ); }
+inline F32 vec_dist2d( VEC3 v1, VEC3 v2 ) { return sqrtf( vec_dist2dsq( v1, v2 ) ); }
inline F32 vec_dot( VEC3 v1, VEC3 v2 ) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; }
inline VEC3 vec_cross( VEC3 v1, VEC3 v2 ) { return { v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x }; }