diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-20 18:44:42 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-20 18:44:42 +0400 |
commit | 6f1f5771ff0440ffd551a93f8c1a6e865f3b1529 (patch) | |
tree | e492c428a4b3b96d50a1c7fa682b0eb2b2e4e4c6 /source/blender/blenlib | |
parent | cf9d03494bb0d79a9801a307380a717ac825fedb (diff) |
Correction to 7c7b730, multiplication order was flipped
That's really annoying that multiplication order is flipped
comparing mat3 and mat4 cases, but for the purposes of not
breaking all the branches which might use this stuff we'd
better keep order consistent with old version for now.
Suggestion here would be to make order consistent but rename
this functions to mult_* to make compilation fail instead
of failing and using wrong order silently.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 74b0df1c6c0..1a4beab34da 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -352,68 +352,68 @@ void _va_mul_serie_m4_3( float r[4][4], float m1[4][4], float m2[4][4]) { - mul_m4_m4m4(r, m2, m1); + mul_m4_m4m4(r, m1, m2); } void _va_mul_serie_m4_4( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); } void _va_mul_serie_m4_5( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4], float m4[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); - mul_m4_m4m4(r, m4, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); + mul_m4_m4m4(r, r, m4); } void _va_mul_serie_m4_6( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4], float m4[4][4], float m5[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); - mul_m4_m4m4(r, m4, r); - mul_m4_m4m4(r, m5, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); + mul_m4_m4m4(r, r, m4); + mul_m4_m4m4(r, r, m5); } void _va_mul_serie_m4_7( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4], float m4[4][4], float m5[4][4], float m6[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); - mul_m4_m4m4(r, m4, r); - mul_m4_m4m4(r, m5, r); - mul_m4_m4m4(r, m6, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); + mul_m4_m4m4(r, r, m4); + mul_m4_m4m4(r, r, m5); + mul_m4_m4m4(r, r, m6); } void _va_mul_serie_m4_8( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4], float m4[4][4], float m5[4][4], float m6[4][4], float m7[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); - mul_m4_m4m4(r, m4, r); - mul_m4_m4m4(r, m5, r); - mul_m4_m4m4(r, m6, r); - mul_m4_m4m4(r, m7, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); + mul_m4_m4m4(r, r, m4); + mul_m4_m4m4(r, r, m5); + mul_m4_m4m4(r, r, m6); + mul_m4_m4m4(r, r, m7); } void _va_mul_serie_m4_9( float r[4][4], float m1[4][4], float m2[4][4], float m3[4][4], float m4[4][4], float m5[4][4], float m6[4][4], float m7[4][4], float m8[4][4]) { - mul_m4_m4m4(r, m2, m1); - mul_m4_m4m4(r, m3, r); - mul_m4_m4m4(r, m4, r); - mul_m4_m4m4(r, m5, r); - mul_m4_m4m4(r, m6, r); - mul_m4_m4m4(r, m7, r); - mul_m4_m4m4(r, m8, r); + mul_m4_m4m4(r, m1, m2); + mul_m4_m4m4(r, r, m3); + mul_m4_m4m4(r, r, m4); + mul_m4_m4m4(r, r, m5); + mul_m4_m4m4(r, r, m6); + mul_m4_m4m4(r, r, m7); + mul_m4_m4m4(r, r, m8); } /** \} */ |