projects
/
vg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e12c6a2
)
fixed mistake in quaternion normalize
author
hgn
<hgodden00@gmail.com>
Mon, 17 Jul 2023 22:07:28 +0000
(23:07 +0100)
committer
hgn
<hgodden00@gmail.com>
Mon, 17 Jul 2023 22:07:28 +0000
(23:07 +0100)
vg_m.h
patch
|
blob
|
history
diff --git
a/vg_m.h
b/vg_m.h
index 0ded4e127302bfd0d396f14416c12710eeb3fb84..8b354d697f442b03d4c943aac878c11b7829ef36 100644
(file)
--- a/
vg_m.h
+++ b/
vg_m.h
@@
-628,11
+628,11
@@
static inline void q_inv( v4f q, v4f d )
d[3] = q[3]*s;
}
-static inline void q_nlerp( v4f a, v4f b, f32 t, v4f d )
-{
+static inline void q_nlerp( v4f a, v4f b, f32 t, v4f d ){
if( v4_dot(a,b) < 0.0f ){
- v4_muls( b, -1.0f, d );
- v4_lerp( a, d, t, d );
+ v4f c;
+ v4_muls( b, -1.0f, c );
+ v4_lerp( a, c, t, d );
}
else
v4_lerp( a, b, t, d );