snow-math 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/snow-math/mat4.c +40 -40
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47e38c89d96a20a0925fce136ffa19d925e1bc51
|
4
|
+
data.tar.gz: b09e53bd8b62d9517cfd7dcdf9c479ac5ffa2871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5512632851857b3fb841d326dfbca46247c7f5d56c5887955ebc380300e1574475f26c50a38935a5c595860240f155d02d7a1f2010af55fb079fe39eca6aa4c8
|
7
|
+
data.tar.gz: 5383e7abf050f611edebd5994196a2631404166db0ae7b0368fb0e2ec462c64bedc73e2c9f28e60d1916e466df95760021a17c4e7512f2f53f04d00eb0a00d85
|
data/README.md
CHANGED
data/ext/snow-math/mat4.c
CHANGED
@@ -686,50 +686,50 @@ void mat4_translation(s_float_t x, s_float_t y, s_float_t z, mat4_t out) {
|
|
686
686
|
void mat4_multiply(const mat4_t left, const mat4_t right, mat4_t out)
|
687
687
|
{
|
688
688
|
mat4_t temp;
|
689
|
-
|
689
|
+
vec4_t c;
|
690
690
|
|
691
691
|
// Transpose the left matrix so we can be a little more cache-friendly.
|
692
692
|
mat4_transpose(left, temp);
|
693
693
|
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
temp[0] = (
|
700
|
-
temp[1] = (
|
701
|
-
temp[2] = (
|
702
|
-
temp[3] = (
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
temp[4] = (
|
710
|
-
temp[5] = (
|
711
|
-
temp[6] = (
|
712
|
-
temp[7] = (
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
temp[8] = (
|
720
|
-
temp[9] = (
|
721
|
-
temp[10] = (
|
722
|
-
temp[11] = (
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
temp[12] = (
|
730
|
-
temp[13] = (
|
731
|
-
temp[14] = (
|
732
|
-
temp[15] = (
|
694
|
+
c[0] = temp[0];
|
695
|
+
c[1] = temp[1];
|
696
|
+
c[2] = temp[2];
|
697
|
+
c[3] = temp[3];
|
698
|
+
|
699
|
+
temp[0] = (c[0]* right[0 ]) + (c[1]* right[1 ]) + (c[2]* right[2 ]) + (c[3]* right[3 ]);
|
700
|
+
temp[1] = (c[0]* right[4 ]) + (c[1]* right[5 ]) + (c[2]* right[6 ]) + (c[3]* right[7 ]);
|
701
|
+
temp[2] = (c[0]* right[8 ]) + (c[1]* right[9 ]) + (c[2]* right[10]) + (c[3]* right[11]);
|
702
|
+
temp[3] = (c[0]* right[12]) + (c[1]* right[13]) + (c[2]* right[14]) + (c[3]* right[15]);
|
703
|
+
|
704
|
+
c[0] = temp[4];
|
705
|
+
c[1] = temp[5];
|
706
|
+
c[2] = temp[6];
|
707
|
+
c[3] = temp[7];
|
708
|
+
|
709
|
+
temp[4] = (c[0]* right[0 ]) + (c[1]* right[1 ]) + (c[2]* right[2 ]) + (c[3]* right[3 ]);
|
710
|
+
temp[5] = (c[0]* right[4 ]) + (c[1]* right[5 ]) + (c[2]* right[6 ]) + (c[3]* right[7 ]);
|
711
|
+
temp[6] = (c[0]* right[8 ]) + (c[1]* right[9 ]) + (c[2]* right[10]) + (c[3]* right[11]);
|
712
|
+
temp[7] = (c[0]* right[12]) + (c[1]* right[13]) + (c[2]* right[14]) + (c[3]* right[15]);
|
713
|
+
|
714
|
+
c[0] = temp[8];
|
715
|
+
c[1] = temp[9];
|
716
|
+
c[2] = temp[10];
|
717
|
+
c[3] = temp[11];
|
718
|
+
|
719
|
+
temp[8] = (c[0]* right[0 ]) + (c[1]* right[1 ]) + (c[2]* right[2 ]) + (c[3]* right[3 ]);
|
720
|
+
temp[9] = (c[0]* right[4 ]) + (c[1]* right[5 ]) + (c[2]* right[6 ]) + (c[3]* right[7 ]);
|
721
|
+
temp[10] = (c[0]* right[8 ]) + (c[1]* right[9 ]) + (c[2]* right[10]) + (c[3]* right[11]);
|
722
|
+
temp[11] = (c[0]* right[12]) + (c[1]* right[13]) + (c[2]* right[14]) + (c[3]* right[15]);
|
723
|
+
|
724
|
+
c[0] = temp[12];
|
725
|
+
c[1] = temp[13];
|
726
|
+
c[2] = temp[14];
|
727
|
+
c[3] = temp[15];
|
728
|
+
|
729
|
+
temp[12] = (c[0]* right[0 ]) + (c[1]* right[1 ]) + (c[2]* right[2 ]) + (c[3]* right[3 ]);
|
730
|
+
temp[13] = (c[0]* right[4 ]) + (c[1]* right[5 ]) + (c[2]* right[6 ]) + (c[3]* right[7 ]);
|
731
|
+
temp[14] = (c[0]* right[8 ]) + (c[1]* right[9 ]) + (c[2]* right[10]) + (c[3]* right[11]);
|
732
|
+
temp[15] = (c[0]* right[12]) + (c[1]* right[13]) + (c[2]* right[14]) + (c[3]* right[15]);
|
733
733
|
|
734
734
|
mat4_transpose(temp, out);
|
735
735
|
}
|