snow-math 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/snow-math/mat4.c +40 -40
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d529480a1cb3aefeacfab64857c085ab0f05b80
4
- data.tar.gz: 9e7974ca6e60e232cc50c671f9c48d0c4f734169
3
+ metadata.gz: 47e38c89d96a20a0925fce136ffa19d925e1bc51
4
+ data.tar.gz: b09e53bd8b62d9517cfd7dcdf9c479ac5ffa2871
5
5
  SHA512:
6
- metadata.gz: 30885e517d2e2cbc49203ce3fd49aa751c8af241e4fe8a448d40584482d74b4217c406b9b93e84ca21b98387f6d54994879bbf9516c66eb43f5db542f2d31ffe
7
- data.tar.gz: dee730d74dd0a7a046d4f98359867a806db9086cba0d7b25d38c13e16d32e30068976e03b63d963e86bef5eae14763ee76d68ddf76341f68773a5f0a5e171f3c
6
+ metadata.gz: 5512632851857b3fb841d326dfbca46247c7f5d56c5887955ebc380300e1574475f26c50a38935a5c595860240f155d02d7a1f2010af55fb079fe39eca6aa4c8
7
+ data.tar.gz: 5383e7abf050f611edebd5994196a2631404166db0ae7b0368fb0e2ec462c64bedc73e2c9f28e60d1916e466df95760021a17c4e7512f2f53f04d00eb0a00d85
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # snow-math
2
2
 
3
- $ gem install snow-math [-- [--use-float | -F]]
3
+ $ gem install snow-math [-- [--use-float | -F] [--use-fast-math | -FM] [--debug | -D]]
4
4
 
5
5
 
6
6
 
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
- s_float_t cx, cy, cz, cw;
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
- cx = temp[0];
695
- cy = temp[1];
696
- cz = temp[2];
697
- cw = temp[3];
698
-
699
- temp[0] = (cx * right[0 ]) + (cy * right[1 ]) + (cz * right[2 ]) + (cw * right[3 ]);
700
- temp[1] = (cx * right[4 ]) + (cy * right[5 ]) + (cz * right[6 ]) + (cw * right[7 ]);
701
- temp[2] = (cx * right[8 ]) + (cy * right[9 ]) + (cz * right[10]) + (cw * right[11]);
702
- temp[3] = (cx * right[12]) + (cy * right[13]) + (cz * right[14]) + (cw * right[15]);
703
-
704
- cx = temp[4];
705
- cy = temp[5];
706
- cz = temp[6];
707
- cw = temp[7];
708
-
709
- temp[4] = (cx * right[0 ]) + (cy * right[1 ]) + (cz * right[2 ]) + (cw * right[3 ]);
710
- temp[5] = (cx * right[4 ]) + (cy * right[5 ]) + (cz * right[6 ]) + (cw * right[7 ]);
711
- temp[6] = (cx * right[8 ]) + (cy * right[9 ]) + (cz * right[10]) + (cw * right[11]);
712
- temp[7] = (cx * right[12]) + (cy * right[13]) + (cz * right[14]) + (cw * right[15]);
713
-
714
- cx = temp[8];
715
- cy = temp[9];
716
- cz = temp[10];
717
- cw = temp[11];
718
-
719
- temp[8] = (cx * right[0 ]) + (cy * right[1 ]) + (cz * right[2 ]) + (cw * right[3 ]);
720
- temp[9] = (cx * right[4 ]) + (cy * right[5 ]) + (cz * right[6 ]) + (cw * right[7 ]);
721
- temp[10] = (cx * right[8 ]) + (cy * right[9 ]) + (cz * right[10]) + (cw * right[11]);
722
- temp[11] = (cx * right[12]) + (cy * right[13]) + (cz * right[14]) + (cw * right[15]);
723
-
724
- cx = temp[12];
725
- cy = temp[13];
726
- cz = temp[14];
727
- cw = temp[15];
728
-
729
- temp[12] = (cx * right[0 ]) + (cy * right[1 ]) + (cz * right[2 ]) + (cw * right[3 ]);
730
- temp[13] = (cx * right[4 ]) + (cy * right[5 ]) + (cz * right[6 ]) + (cw * right[7 ]);
731
- temp[14] = (cx * right[8 ]) + (cy * right[9 ]) + (cz * right[10]) + (cw * right[11]);
732
- temp[15] = (cx * right[12]) + (cy * right[13]) + (cz * right[14]) + (cw * right[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
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snow-math
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Raymond Cower