From 39beab16f12a574af6d5ea4bf907e23ea0078863 Mon Sep 17 00:00:00 2001 From: aura Date: Fri, 27 Feb 2026 12:23:01 +0100 Subject: movement polishes --- src/util/vector.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util') 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 }; } -- cgit v1.2.3