collision test

This commit is contained in:
onezplpl 2024-07-17 09:18:33 -04:00
parent e2e4a7f69b
commit efce4df380
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3
2 changed files with 74 additions and 13 deletions

View file

@ -42,7 +42,8 @@
return sqrtf(vec##n##_mul_inner(v, v)); \
} \
LINMATH_H_FUNC void vec##n##_norm(vec##n r, vec##n const v) { \
float k = 1.f / vec##n##_len(v); \
float l = vec##n##_len(v); \
float k = 1.f / (l == 0.0 ? 1.0 : l); \
vec##n##_scale(r, v, k); \
} \
LINMATH_H_FUNC void vec##n##_min(vec##n r, vec##n const a, vec##n const b) { \