summaryrefslogtreecommitdiff
path: root/src/maths/maths.h
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-04-21 11:52:42 +1000
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-04-21 11:52:42 +1000
commitff923749ef298346c5448e90e8338bfc28e4f66b (patch)
tree4ce844e04984e1b55647886bd05779aa7dc8ea18 /src/maths/maths.h
parent374567ae4b18627f9ab410e7e5a38b1e7aeb04c5 (diff)
parentd8b564ffd1257152094966784a8db3d1396a8879 (diff)
Merge branch 'master' into cel-67-load-animation-data-from-gltf
Diffstat (limited to 'src/maths/maths.h')
-rw-r--r--src/maths/maths.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/maths/maths.h b/src/maths/maths.h
index 911b9b7..8e48435 100644
--- a/src/maths/maths.h
+++ b/src/maths/maths.h
@@ -64,8 +64,8 @@ static inline vec4 vec4_create(f32 x, f32 y, f32 z, f32 w) { return (vec4){ x, y
static inline f32 quat_dot(quat a, quat b) { return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; }
static inline quat quat_normalise(quat a) {
- f32 length = sqrtf(quat_dot(a, a) // same as len squared
- );
+ f32 length = sqrtf(quat_dot(a, a)); // same as len squared
+
return (quat){ a.x / length, a.y / length, a.z / length, a.w / length };
}
@@ -307,7 +307,7 @@ static inline mat4 mat4_look_at(vec3 position, vec3 target, vec3 up) {
.is_dirty = false })
static transform transform_create(vec3 pos, quat rot, f32 scale) {
- return (transform){ .position = pos, .rotation = rot, .scale = scale, .is_dirty = false };
+ return (transform){ .position = pos, .rotation = rot, .scale = scale, .is_dirty = true };
}
static inline mat4 transform_to_mat(transform *tf) {