diff options
| author | aura <nw@moneybot.cc> | 2026-02-27 12:23:01 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-27 12:23:01 +0100 |
| commit | 39beab16f12a574af6d5ea4bf907e23ea0078863 (patch) | |
| tree | c799cc4334bb2bd7cd22d737a9636371b1dd1782 /src/util | |
| parent | 7c0e1e9b3beb0ab5f00c27eb97b84570c532b9ac (diff) | |
movement polishes
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/vector.h | 2 |
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 }; } |
