cglm 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/Gemfile.lock +18 -16
  4. data/README.md +2 -0
  5. data/cglm.gemspec +3 -3
  6. data/ext/cglm/cglm-0.6.2/include/cglm/affine-mat.h +168 -0
  7. data/ext/cglm/cglm-0.6.2/include/cglm/affine.h +490 -0
  8. data/ext/cglm/cglm-0.6.2/include/cglm/applesimd.h +95 -0
  9. data/ext/cglm/cglm-0.6.2/include/cglm/bezier.h +154 -0
  10. data/ext/cglm/cglm-0.6.2/include/cglm/box.h +279 -0
  11. data/ext/cglm/cglm-0.6.2/include/cglm/call/affine.h +117 -0
  12. data/ext/cglm/cglm-0.6.2/include/cglm/call/bezier.h +31 -0
  13. data/ext/cglm/cglm-0.6.2/include/cglm/call/box.h +79 -0
  14. data/ext/cglm/cglm-0.6.2/include/cglm/call/cam.h +143 -0
  15. data/ext/cglm/cglm-0.6.2/include/cglm/call/curve.h +23 -0
  16. data/ext/cglm/cglm-0.6.2/include/cglm/call/ease.h +143 -0
  17. data/ext/cglm/cglm-0.6.2/include/cglm/call/euler.h +55 -0
  18. data/ext/cglm/cglm-0.6.2/include/cglm/call/frustum.h +41 -0
  19. data/ext/cglm/cglm-0.6.2/include/cglm/call/io.h +44 -0
  20. data/ext/cglm/cglm-0.6.2/include/cglm/call/mat3.h +86 -0
  21. data/ext/cglm/cglm-0.6.2/include/cglm/call/mat4.h +127 -0
  22. data/ext/cglm/cglm-0.6.2/include/cglm/call/plane.h +23 -0
  23. data/ext/cglm/cglm-0.6.2/include/cglm/call/project.h +33 -0
  24. data/ext/cglm/cglm-0.6.2/include/cglm/call/quat.h +159 -0
  25. data/ext/cglm/cglm-0.6.2/include/cglm/call/sphere.h +39 -0
  26. data/ext/cglm/cglm-0.6.2/include/cglm/call/vec3.h +312 -0
  27. data/ext/cglm/cglm-0.6.2/include/cglm/call/vec4.h +290 -0
  28. data/ext/cglm/cglm-0.6.2/include/cglm/call.h +36 -0
  29. data/ext/cglm/cglm-0.6.2/include/cglm/cam.h +585 -0
  30. data/ext/cglm/cglm-0.6.2/include/cglm/cglm.h +32 -0
  31. data/ext/cglm/cglm-0.6.2/include/cglm/color.h +26 -0
  32. data/ext/cglm/cglm-0.6.2/include/cglm/common.h +37 -0
  33. data/ext/cglm/cglm-0.6.2/include/cglm/curve.h +40 -0
  34. data/ext/cglm/cglm-0.6.2/include/cglm/ease.h +317 -0
  35. data/ext/cglm/cglm-0.6.2/include/cglm/euler.h +453 -0
  36. data/ext/cglm/cglm-0.6.2/include/cglm/frustum.h +255 -0
  37. data/ext/cglm/cglm-0.6.2/include/cglm/io.h +203 -0
  38. data/ext/cglm/cglm-0.6.2/include/cglm/mat3.h +422 -0
  39. data/ext/cglm/cglm-0.6.2/include/cglm/mat4.h +726 -0
  40. data/ext/cglm/cglm-0.6.2/include/cglm/plane.h +36 -0
  41. data/ext/cglm/cglm-0.6.2/include/cglm/project.h +118 -0
  42. data/ext/cglm/cglm-0.6.2/include/cglm/quat.h +828 -0
  43. data/ext/cglm/cglm-0.6.2/include/cglm/simd/arm.h +83 -0
  44. data/ext/cglm/cglm-0.6.2/include/cglm/simd/avx/affine.h +66 -0
  45. data/ext/cglm/cglm-0.6.2/include/cglm/simd/avx/mat4.h +66 -0
  46. data/ext/cglm/cglm-0.6.2/include/cglm/simd/intrin.h +90 -0
  47. data/ext/cglm/cglm-0.6.2/include/cglm/simd/neon/mat4.h +57 -0
  48. data/ext/cglm/cglm-0.6.2/include/cglm/simd/sse2/affine.h +111 -0
  49. data/ext/cglm/cglm-0.6.2/include/cglm/simd/sse2/mat3.h +59 -0
  50. data/ext/cglm/cglm-0.6.2/include/cglm/simd/sse2/mat4.h +405 -0
  51. data/ext/cglm/cglm-0.6.2/include/cglm/simd/sse2/quat.h +46 -0
  52. data/ext/cglm/cglm-0.6.2/include/cglm/simd/x86.h +192 -0
  53. data/ext/cglm/cglm-0.6.2/include/cglm/sphere.h +99 -0
  54. data/ext/cglm/cglm-0.6.2/include/cglm/struct/affine.h +337 -0
  55. data/ext/cglm/cglm-0.6.2/include/cglm/struct/box.h +256 -0
  56. data/ext/cglm/cglm-0.6.2/include/cglm/struct/cam.h +451 -0
  57. data/ext/cglm/cglm-0.6.2/include/cglm/struct/color.h +27 -0
  58. data/ext/cglm/cglm-0.6.2/include/cglm/struct/curve.h +40 -0
  59. data/ext/cglm/cglm-0.6.2/include/cglm/struct/euler.h +152 -0
  60. data/ext/cglm/cglm-0.6.2/include/cglm/struct/frustum.h +155 -0
  61. data/ext/cglm/cglm-0.6.2/include/cglm/struct/io.h +82 -0
  62. data/ext/cglm/cglm-0.6.2/include/cglm/struct/mat3.h +285 -0
  63. data/ext/cglm/cglm-0.6.2/include/cglm/struct/mat4.h +459 -0
  64. data/ext/cglm/cglm-0.6.2/include/cglm/struct/plane.h +40 -0
  65. data/ext/cglm/cglm-0.6.2/include/cglm/struct/project.h +104 -0
  66. data/ext/cglm/cglm-0.6.2/include/cglm/struct/quat.h +532 -0
  67. data/ext/cglm/cglm-0.6.2/include/cglm/struct/sphere.h +93 -0
  68. data/ext/cglm/cglm-0.6.2/include/cglm/struct/vec3-ext.h +257 -0
  69. data/ext/cglm/cglm-0.6.2/include/cglm/struct/vec3.h +970 -0
  70. data/ext/cglm/cglm-0.6.2/include/cglm/struct/vec4-ext.h +257 -0
  71. data/ext/cglm/cglm-0.6.2/include/cglm/struct/vec4.h +814 -0
  72. data/ext/cglm/cglm-0.6.2/include/cglm/struct.h +36 -0
  73. data/ext/cglm/cglm-0.6.2/include/cglm/types-struct.h +129 -0
  74. data/ext/cglm/cglm-0.6.2/include/cglm/types.h +76 -0
  75. data/ext/cglm/cglm-0.6.2/include/cglm/util.h +328 -0
  76. data/ext/cglm/cglm-0.6.2/include/cglm/vec3-ext.h +272 -0
  77. data/ext/cglm/cglm-0.6.2/include/cglm/vec3.h +1078 -0
  78. data/ext/cglm/cglm-0.6.2/include/cglm/vec4-ext.h +315 -0
  79. data/ext/cglm/cglm-0.6.2/include/cglm/vec4.h +1078 -0
  80. data/ext/cglm/cglm-0.6.2/include/cglm/version.h +15 -0
  81. data/ext/cglm/extconf.rb +2 -3
  82. data/ext/cglm/rb_cglm.h +5 -3
  83. data/ext/cglm/rb_cglm_mat3.c +3 -3
  84. data/ext/cglm/rb_cglm_mat4.c +3 -3
  85. data/ext/cglm/rb_cglm_quat.c +2 -2
  86. data/ext/cglm/rb_cglm_vec3.c +63 -61
  87. data/ext/cglm/rb_cglm_vec4.c +2 -0
  88. data/ext/cglm/ruby_pre27.h +35 -0
  89. data/lib/cglm/vec3.rb +2 -2
  90. data/lib/cglm/vec4.rb +2 -2
  91. data/lib/cglm/vector_type.rb +15 -0
  92. data/lib/cglm/version.rb +1 -1
  93. metadata +89 -13
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Copyright (c), Recep Aslantas.
3
+ *
4
+ * MIT License (MIT), http://opensource.org/licenses/MIT
5
+ * Full license can be found in the LICENSE file
6
+ */
7
+
8
+ #ifndef cglm_version_h
9
+ #define cglm_version_h
10
+
11
+ #define CGLM_VERSION_MAJOR 0
12
+ #define CGLM_VERSION_MINOR 6
13
+ #define CGLM_VERSION_PATCH 2
14
+
15
+ #endif /* cglm_version_h */
data/ext/cglm/extconf.rb CHANGED
@@ -3,11 +3,10 @@ require 'fileutils'
3
3
  require 'rubygems/package'
4
4
  require 'zlib'
5
5
 
6
- #CGLM_VERSION = '0.5.0'
7
- CGLM_VERSION = '89f64f079477b1af15f47e6b96db52c767acb057'
6
+ CGLM_VERSION = 'v0.6.2'
8
7
  cglm_source_url = "https://github.com/recp/cglm/archive/#{CGLM_VERSION}.tar.gz"
9
8
  cglm_tar_gz = File.expand_path("cglm-#{CGLM_VERSION}.tar.gz", __dir__)
10
- cglm_dir = File.expand_path("cglm-#{CGLM_VERSION}", __dir__)
9
+ cglm_dir = File.expand_path("cglm-0.6.2", __dir__)
11
10
 
12
11
  # fetch cglm unless it's already on the file system
13
12
  unless File.exist?(cglm_dir)
data/ext/cglm/rb_cglm.h CHANGED
@@ -2,6 +2,7 @@
2
2
  #define RB_CGLM_H 1
3
3
 
4
4
  #include "ruby.h"
5
+ #include "ruby_pre27.h"
5
6
  #include <errno.h>
6
7
 
7
8
  // Based on unit test results I think the FLT_EPSILON that is used for fuzzy
@@ -96,7 +97,7 @@ static inline size_t vec3_size() { return sizeof(vec3); }
96
97
  static inline size_t vec4_size() { return sizeof(vec4); }
97
98
  static inline size_t aabb_size() { return sizeof(aabb); }
98
99
  static inline size_t mat4_size() { return sizeof(mat4); }
99
- static inline size_t mat3_size() { return sizeof(mat4); }
100
+ static inline size_t mat3_size() { return sizeof(mat3); }
100
101
  static inline size_t quat_size() { return sizeof(mat4); }
101
102
  static inline size_t plane_size() { return sizeof(plane); }
102
103
 
@@ -106,7 +107,8 @@ static inline VALUE CGLM_NEW(VALUE klass, size_t size, void *addr) {
106
107
  VALUE kw = rb_hash_new();
107
108
  VALUE ptr = PTR2FIDDLE(addr, size);
108
109
  rb_hash_aset(kw, ID2SYM(rb_intern("addr")), ptr);
109
- return rb_funcall(klass, rb_intern("new"), 1, kw);
110
+ VALUE kwarg[] = { kw };
111
+ return rb_funcallv_kw(klass, rb_intern("new"), 1, kwarg, 1);
110
112
  }
111
113
 
112
114
  static inline void *__aligned_alloc(size_t align, size_t size) {
@@ -151,7 +153,7 @@ static inline void *VAL2ADDR(VALUE val, size_t min_size) {
151
153
  VALUE addr = rb_funcall(val, rb_intern("addr"), 0);
152
154
  VALUE size = rb_funcall(addr, rb_intern("size"), 0);
153
155
  if (min_size > NUM2SIZET(size))
154
- rb_raise(rb_eArgError, "memory store (size %zu) is not large enough to be converted into the requested type (size %zu)", NUM2SIZET(size), min_size);
156
+ rb_raise(rb_eArgError, "memory store (size %zu) is not large enough to be converted into the requested type (size %zu)", (size_t) NUM2SIZET(size), min_size);
155
157
  return NUM2PTR(rb_funcall(addr, rb_intern("to_i"), 0));
156
158
  }
157
159
 
@@ -54,7 +54,7 @@ VALUE rb_cglm_mat3_transpose(int argc, VALUE *argv, VALUE self) {
54
54
  *
55
55
  * Transposes this matrix in-place and returns `self`.
56
56
  */
57
- VALUE rb_cglm_mat3_transpose_self(int argc, VALUE *argv, VALUE self) {
57
+ VALUE rb_cglm_mat3_transpose_self(VALUE self) {
58
58
  glm_mat3_transpose(VAL2MAT3(self));
59
59
  return self;
60
60
  }
@@ -117,7 +117,7 @@ VALUE rb_cglm_mat3_inverse(int argc, VALUE *argv, VALUE self) {
117
117
  * Calcaultes the inverse of `self`, modifies `self` in-place, and returns
118
118
  * `self`.
119
119
  */
120
- VALUE rb_cglm_mat3_inverse_self(int argc, VALUE *argv, VALUE self) {
120
+ VALUE rb_cglm_mat3_inverse_self(VALUE self) {
121
121
  glm_mat3_inv(VAL2MAT3(self), VAL2MAT3(self));
122
122
  return self;
123
123
  }
@@ -230,7 +230,7 @@ void Init_cglm_mat3() {
230
230
  rb_define_method(rb_cMat3, "mul_mat3", rb_cglm_mat3_mul_mat3, -1);
231
231
  rb_define_method(rb_cMat3, "mul_vec3", rb_cglm_mat3_mul_vec3, -1);
232
232
  rb_define_method(rb_cMat3, "mul_scalar", rb_cglm_mat3_mul_scalar, -1);
233
- rb_define_method(rb_cMat3, "mul_scalar!", rb_cglm_mat3_mul_scalar_self, 0);
233
+ rb_define_method(rb_cMat3, "mul_scalar!", rb_cglm_mat3_mul_scalar_self, 1);
234
234
  rb_define_method(rb_cMat3, "transpose", rb_cglm_mat3_transpose, -1);
235
235
  rb_define_method(rb_cMat3, "transpose!", rb_cglm_mat3_transpose_self, 0);
236
236
  rb_define_method(rb_cMat3, "to_quat", rb_cglm_mat3_to_quat, -1);
@@ -161,7 +161,7 @@ VALUE rb_cglm_mat4_invert(int argc, VALUE *argv, VALUE self) {
161
161
  *
162
162
  * Computes the inverse of this matrix in-place and returns `self`.
163
163
  */
164
- VALUE rb_cglm_mat4_invert_self(int argc, VALUE *argv, VALUE self) {
164
+ VALUE rb_cglm_mat4_invert_self(VALUE self) {
165
165
  glm_mat4_inv(VAL2MAT4(self), VAL2MAT4(self));
166
166
  return self;
167
167
  }
@@ -191,7 +191,7 @@ VALUE rb_cglm_mat4_invert_fast(int argc, VALUE *argv, VALUE self) {
191
191
  * e.g Newton-Raphson. This should work faster than normal, but will be less
192
192
  * precise.
193
193
  */
194
- VALUE rb_cglm_mat4_invert_fast_self(int argc, VALUE *argv, VALUE self) {
194
+ VALUE rb_cglm_mat4_invert_fast_self(VALUE self) {
195
195
  glm_mat4_inv_fast(VAL2MAT4(self), VAL2MAT4(self));
196
196
  return self;
197
197
  }
@@ -285,7 +285,7 @@ void Init_cglm_mat4() {
285
285
  rb_define_method(rb_cMat4, "mul_vec4", rb_cglm_mat4_mul_vec4, -1);
286
286
  rb_define_method(rb_cMat4, "mul_vec3", rb_cglm_mat4_mul_vec3, -1);
287
287
  rb_define_method(rb_cMat4, "mul_scalar", rb_cglm_mat4_mul_scalar, -1);
288
- rb_define_method(rb_cMat4, "mul_scalar!", rb_cglm_mat4_mul_scalar_self, 0);
288
+ rb_define_method(rb_cMat4, "mul_scalar!", rb_cglm_mat4_mul_scalar_self, 1);
289
289
  rb_define_method(rb_cMat4, "transpose", rb_cglm_mat4_transpose, -1);
290
290
  rb_define_method(rb_cMat4, "transpose!", rb_cglm_mat4_transpose_self, 0);
291
291
  rb_define_method(rb_cMat4, "determinant", rb_cglm_mat4_determinant, 0);
@@ -201,13 +201,13 @@ VALUE rb_cglm_quat_to_mat3t(int argc, VALUE *argv, VALUE self) {
201
201
 
202
202
  /* call-seq: lerp!(from, to, amount) => self */
203
203
  VALUE rb_cglm_quat_lerp_self(VALUE self, VALUE from, VALUE to, VALUE amount) {
204
- glm_quat_lerp(VAL2QUAT(from), VAL2QUAT(to), NUM2FLT(to), VAL2QUAT(self));
204
+ glm_quat_lerp(VAL2QUAT(from), VAL2QUAT(to), NUM2FLT(amount), VAL2QUAT(self));
205
205
  return self;
206
206
  }
207
207
 
208
208
  /* call-seq: slerp!(from, to, amount) => self */
209
209
  VALUE rb_cglm_quat_slerp_self(VALUE self, VALUE from, VALUE to, VALUE amount) {
210
- glm_quat_slerp(VAL2QUAT(from), VAL2QUAT(to), NUM2FLT(to), VAL2QUAT(self));
210
+ glm_quat_slerp(VAL2QUAT(from), VAL2QUAT(to), NUM2FLT(amount), VAL2QUAT(self));
211
211
  return self;
212
212
  }
213
213
 
@@ -55,17 +55,17 @@ VALUE rb_cglm_vec3_zero(VALUE self) {
55
55
  }
56
56
 
57
57
  VALUE rb_cglm_vec3_zero_self(VALUE self) {
58
- glm_vec_zero(VAL2VEC3(self));
58
+ glm_vec3_zero(VAL2VEC3(self));
59
59
  return self;
60
60
  }
61
61
 
62
62
  VALUE rb_cglm_vec3_one_self(VALUE self) {
63
- glm_vec_one(VAL2VEC3(self));
63
+ glm_vec3_one(VAL2VEC3(self));
64
64
  return self;
65
65
  }
66
66
 
67
67
  VALUE rb_cglm_vec3_dot(VALUE self, VALUE other) {
68
- return DBL2NUM(glm_vec_dot(VAL2VEC3(self), VAL2VEC3(self)));
68
+ return DBL2NUM(glm_vec3_dot(VAL2VEC3(self), VAL2VEC3(self)));
69
69
  }
70
70
 
71
71
  /* call-seq: cross(b[, dest]) => dest | new Vec3 */
@@ -73,7 +73,7 @@ VALUE rb_cglm_vec3_cross(int argc, VALUE *argv, VALUE self) {
73
73
  VALUE b, dest;
74
74
  rb_scan_args(argc, argv, "11", &b, &dest);
75
75
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
76
- glm_vec_cross(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
76
+ glm_vec3_cross(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
77
77
  return dest;
78
78
  }
79
79
 
@@ -83,7 +83,7 @@ VALUE rb_cglm_vec3_cross(int argc, VALUE *argv, VALUE self) {
83
83
  * `norm ** 2` to avoid an unnecessary square root.
84
84
  */
85
85
  VALUE rb_cglm_vec3_norm2(VALUE self) {
86
- return DBL2NUM(glm_vec_norm2(VAL2VEC3(self)));
86
+ return DBL2NUM(glm_vec3_norm2(VAL2VEC3(self)));
87
87
  }
88
88
 
89
89
  /* call-seq: norm => Numeric
@@ -91,7 +91,7 @@ VALUE rb_cglm_vec3_norm2(VALUE self) {
91
91
  * Returns the norm (magnitude) of this vector.
92
92
  */
93
93
  VALUE rb_cglm_vec3_norm(VALUE self) {
94
- return DBL2NUM(glm_vec_norm(VAL2VEC3(self)));
94
+ return DBL2NUM(glm_vec3_norm(VAL2VEC3(self)));
95
95
  }
96
96
 
97
97
  /* call-seq: add_vec3(b[, dest]) => dest | new Vec3
@@ -103,7 +103,7 @@ VALUE rb_cglm_vec3_add_vec3(int argc, VALUE *argv, VALUE self) {
103
103
  VALUE b, dest;
104
104
  rb_scan_args(argc, argv, "11", &b, &dest);
105
105
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
106
- glm_vec_add(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
106
+ glm_vec3_add(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
107
107
  return dest;
108
108
  }
109
109
 
@@ -116,7 +116,7 @@ VALUE rb_cglm_vec3_add_scalar(int argc, VALUE *argv, VALUE self) {
116
116
  VALUE b, dest;
117
117
  rb_scan_args(argc, argv, "11", &b, &dest);
118
118
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
119
- glm_vec_adds(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
119
+ glm_vec3_adds(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
120
120
  return dest;
121
121
  }
122
122
 
@@ -129,7 +129,7 @@ VALUE rb_cglm_vec3_sub_vec3(int argc, VALUE *argv, VALUE self) {
129
129
  VALUE b, dest;
130
130
  rb_scan_args(argc, argv, "11", &b, &dest);
131
131
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
132
- glm_vec_sub(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
132
+ glm_vec3_sub(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
133
133
  return dest;
134
134
  }
135
135
 
@@ -142,7 +142,7 @@ VALUE rb_cglm_vec3_sub_scalar(int argc, VALUE *argv, VALUE self) {
142
142
  VALUE b, dest;
143
143
  rb_scan_args(argc, argv, "11", &b, &dest);
144
144
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
145
- glm_vec_subs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
145
+ glm_vec3_subs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
146
146
  return dest;
147
147
  }
148
148
 
@@ -151,7 +151,7 @@ VALUE rb_cglm_vec3_sub_scalar(int argc, VALUE *argv, VALUE self) {
151
151
  * Adds `self` and `b` together, modifying `self` in-place and returning it.
152
152
  */
153
153
  VALUE rb_cglm_vec3_add_vec3_self(VALUE self, VALUE b) {
154
- glm_vec_add(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
154
+ glm_vec3_add(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
155
155
  return self;
156
156
  }
157
157
 
@@ -161,7 +161,7 @@ VALUE rb_cglm_vec3_add_vec3_self(VALUE self, VALUE b) {
161
161
  * and returning it.
162
162
  */
163
163
  VALUE rb_cglm_vec3_add_scalar_self(VALUE self, VALUE b) {
164
- glm_vec_adds(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
164
+ glm_vec3_adds(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
165
165
  return self;
166
166
  }
167
167
 
@@ -170,7 +170,7 @@ VALUE rb_cglm_vec3_add_scalar_self(VALUE self, VALUE b) {
170
170
  * Subtracts `b` from `self`, modifying `self` in-place and returning it.
171
171
  */
172
172
  VALUE rb_cglm_vec3_sub_vec3_self(VALUE self, VALUE b) {
173
- glm_vec_sub(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
173
+ glm_vec3_sub(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
174
174
  return self;
175
175
  }
176
176
 
@@ -180,7 +180,7 @@ VALUE rb_cglm_vec3_sub_vec3_self(VALUE self, VALUE b) {
180
180
  * in-place and returning it.
181
181
  */
182
182
  VALUE rb_cglm_vec3_sub_scalar_self(VALUE self, VALUE b) {
183
- glm_vec_subs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
183
+ glm_vec3_subs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
184
184
  return self;
185
185
  }
186
186
 
@@ -194,7 +194,7 @@ VALUE rb_cglm_vec3_mul_vec3(int argc, VALUE *argv, VALUE self) {
194
194
  VALUE b, dest;
195
195
  rb_scan_args(argc, argv, "11", &b, &dest);
196
196
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
197
- glm_vec_mul(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
197
+ glm_vec3_mul(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
198
198
  return dest;
199
199
  }
200
200
 
@@ -204,7 +204,7 @@ VALUE rb_cglm_vec3_mul_vec3(int argc, VALUE *argv, VALUE self) {
204
204
  * in-place and returns `self`.
205
205
  */
206
206
  VALUE rb_cglm_vec3_mul_vec3_self(VALUE self, VALUE b) {
207
- glm_vec_mul(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
207
+ glm_vec3_mul(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
208
208
  return self;
209
209
  }
210
210
 
@@ -218,7 +218,7 @@ VALUE rb_cglm_vec3_mul_scalar(int argc, VALUE *argv, VALUE self) {
218
218
  VALUE b, dest;
219
219
  rb_scan_args(argc, argv, "11", &b, &dest);
220
220
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
221
- glm_vec_scale(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
221
+ glm_vec3_scale(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
222
222
  return dest;
223
223
  }
224
224
 
@@ -228,7 +228,7 @@ VALUE rb_cglm_vec3_mul_scalar(int argc, VALUE *argv, VALUE self) {
228
228
  * in-place and returns `self`.
229
229
  */
230
230
  VALUE rb_cglm_vec3_mul_scalar_self(VALUE self, VALUE b) {
231
- glm_vec_scale(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
231
+ glm_vec3_scale(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
232
232
  return self;
233
233
  }
234
234
 
@@ -241,7 +241,7 @@ VALUE rb_cglm_vec3_resize(int argc, VALUE *argv, VALUE self) {
241
241
  VALUE b, dest;
242
242
  rb_scan_args(argc, argv, "11", &b, &dest);
243
243
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
244
- glm_vec_scale_as(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
244
+ glm_vec3_scale_as(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
245
245
  return dest;
246
246
  }
247
247
 
@@ -250,7 +250,7 @@ VALUE rb_cglm_vec3_resize(int argc, VALUE *argv, VALUE self) {
250
250
  * Same as `normalize(self) * b`. Modifies `self` in-place and returns `self`.
251
251
  */
252
252
  VALUE rb_cglm_vec3_resize_self(VALUE self, VALUE b) {
253
- glm_vec_scale_as(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
253
+ glm_vec3_scale_as(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
254
254
  return self;
255
255
  }
256
256
 
@@ -264,7 +264,7 @@ VALUE rb_cglm_vec3_div_vec3(int argc, VALUE *argv, VALUE self) {
264
264
  VALUE b, dest;
265
265
  rb_scan_args(argc, argv, "11", &b, &dest);
266
266
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
267
- glm_vec_div(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
267
+ glm_vec3_div(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
268
268
  return dest;
269
269
  }
270
270
 
@@ -274,7 +274,7 @@ VALUE rb_cglm_vec3_div_vec3(int argc, VALUE *argv, VALUE self) {
274
274
  * in-place and returns `self`.
275
275
  */
276
276
  VALUE rb_cglm_vec3_div_vec3_self(VALUE self, VALUE b) {
277
- glm_vec_div(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
277
+ glm_vec3_div(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
278
278
  return self;
279
279
  }
280
280
 
@@ -288,7 +288,7 @@ VALUE rb_cglm_vec3_div_scalar(int argc, VALUE *argv, VALUE self) {
288
288
  VALUE b, dest;
289
289
  rb_scan_args(argc, argv, "11", &b, &dest);
290
290
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
291
- glm_vec_divs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
291
+ glm_vec3_divs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(dest));
292
292
  return dest;
293
293
  }
294
294
 
@@ -298,7 +298,7 @@ VALUE rb_cglm_vec3_div_scalar(int argc, VALUE *argv, VALUE self) {
298
298
  * in-place and returns `self`.
299
299
  */
300
300
  VALUE rb_cglm_vec3_div_scalar_self(VALUE self, VALUE b) {
301
- glm_vec_divs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
301
+ glm_vec3_divs(VAL2VEC3(self), NUM2FLT(b), VAL2VEC3(self));
302
302
  return self;
303
303
  }
304
304
 
@@ -310,7 +310,7 @@ VALUE rb_cglm_vec3_div_scalar_self(VALUE self, VALUE b) {
310
310
  * * `dest` is not optional for this method, as it is for most others.
311
311
  */
312
312
  VALUE rb_cglm_vec3_addadd_vec3(VALUE self, VALUE other, VALUE dest) {
313
- glm_vec_addadd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
313
+ glm_vec3_addadd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
314
314
  return dest;
315
315
  }
316
316
 
@@ -322,7 +322,7 @@ VALUE rb_cglm_vec3_addadd_vec3(VALUE self, VALUE other, VALUE dest) {
322
322
  * * `dest` is not optional for this method, as it is for most others.
323
323
  */
324
324
  VALUE rb_cglm_vec3_subadd_vec3(VALUE self, VALUE other, VALUE dest) {
325
- glm_vec_subadd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
325
+ glm_vec3_subadd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
326
326
  return dest;
327
327
  }
328
328
 
@@ -334,7 +334,7 @@ VALUE rb_cglm_vec3_subadd_vec3(VALUE self, VALUE other, VALUE dest) {
334
334
  * * `dest` is not optional for this method, as it is for most others.
335
335
  */
336
336
  VALUE rb_cglm_vec3_muladd_vec3(VALUE self, VALUE other, VALUE dest) {
337
- glm_vec_muladd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
337
+ glm_vec3_muladd(VAL2VEC3(self), VAL2VEC3(other), VAL2VEC3(dest));
338
338
  return dest;
339
339
  }
340
340
 
@@ -348,7 +348,7 @@ VALUE rb_cglm_vec3_muladd_vec3(VALUE self, VALUE other, VALUE dest) {
348
348
  * * `dest` is not optional for this method, as it is for most others.
349
349
  */
350
350
  VALUE rb_cglm_vec3_muladd_scalar(VALUE self, VALUE other, VALUE dest) {
351
- glm_vec_muladds(VAL2VEC3(self), NUM2FLT(other), VAL2VEC3(dest));
351
+ glm_vec3_muladds(VAL2VEC3(self), NUM2FLT(other), VAL2VEC3(dest));
352
352
  return dest;
353
353
  }
354
354
 
@@ -361,7 +361,7 @@ VALUE rb_cglm_vec3_flip_signs(int argc, VALUE *argv, VALUE self) {
361
361
  VALUE dest;
362
362
  rb_scan_args(argc, argv, "01", &dest);
363
363
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
364
- glm_vec_flipsign_to(VAL2VEC3(self), VAL2VEC3(dest));
364
+ glm_vec3_flipsign_to(VAL2VEC3(self), VAL2VEC3(dest));
365
365
  return dest;
366
366
  }
367
367
 
@@ -370,7 +370,7 @@ VALUE rb_cglm_vec3_flip_signs(int argc, VALUE *argv, VALUE self) {
370
370
  * Flips the sign of each component, modifying `self` in-place. Returns `self`.
371
371
  */
372
372
  VALUE rb_cglm_vec3_flip_signs_self(VALUE self) {
373
- glm_vec_flipsign(VAL2VEC3(self));
373
+ glm_vec3_flipsign(VAL2VEC3(self));
374
374
  return self;
375
375
  }
376
376
 
@@ -383,7 +383,7 @@ VALUE rb_cglm_vec3_normalize(int argc, VALUE *argv, VALUE self) {
383
383
  VALUE dest;
384
384
  rb_scan_args(argc, argv, "01", &dest);
385
385
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
386
- glm_vec_normalize_to(VAL2VEC3(self), VAL2VEC3(dest));
386
+ glm_vec3_normalize_to(VAL2VEC3(self), VAL2VEC3(dest));
387
387
  return dest;
388
388
  }
389
389
 
@@ -392,7 +392,7 @@ VALUE rb_cglm_vec3_normalize(int argc, VALUE *argv, VALUE self) {
392
392
  * Normalizes `self` in-place, and returns `self`.
393
393
  */
394
394
  VALUE rb_cglm_vec3_normalize_self(VALUE self) {
395
- glm_vec_normalize(VAL2VEC3(self));
395
+ glm_vec3_normalize(VAL2VEC3(self));
396
396
  return self;
397
397
  }
398
398
 
@@ -401,7 +401,7 @@ VALUE rb_cglm_vec3_normalize_self(VALUE self) {
401
401
  * Returns the angle between `self` and `other`, in radians.
402
402
  */
403
403
  VALUE rb_cglm_vec3_angle(VALUE self, VALUE other) {
404
- return DBL2NUM(glm_vec_angle(VAL2VEC3(self), VAL2VEC3(other)));
404
+ return DBL2NUM(glm_vec3_angle(VAL2VEC3(self), VAL2VEC3(other)));
405
405
  }
406
406
 
407
407
  /* call-seq: rotate_axis_angle(axis, angle[, dest]) => dest | new Vec3
@@ -415,7 +415,7 @@ VALUE rb_cglm_vec3_rotate_axis_angle(int argc, VALUE *argv, VALUE self) {
415
415
  rb_scan_args(argc, argv, "21", &axis, &angle, &dest);
416
416
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
417
417
  memcpy(&VAL2VEC3(dest), &VAL2VEC3(self), sizeof(vec3));
418
- glm_vec_rotate(VAL2VEC3(dest), NUM2FLT(angle), VAL2VEC3(axis));
418
+ glm_vec3_rotate(VAL2VEC3(dest), NUM2FLT(angle), VAL2VEC3(axis));
419
419
  return dest;
420
420
  }
421
421
 
@@ -426,7 +426,7 @@ VALUE rb_cglm_vec3_rotate_axis_angle(int argc, VALUE *argv, VALUE self) {
426
426
  * returns `self`.
427
427
  */
428
428
  VALUE rb_cglm_vec3_rotate_axis_angle_self(VALUE self, VALUE axis, VALUE angle) {
429
- glm_vec_rotate(VAL2VEC3(self), NUM2FLT(angle), VAL2VEC3(axis));
429
+ glm_vec3_rotate(VAL2VEC3(self), NUM2FLT(angle), VAL2VEC3(axis));
430
430
  return self;
431
431
  }
432
432
 
@@ -447,7 +447,7 @@ VALUE rb_cglm_vec3_rotate_mat4(int argc, VALUE *argv, VALUE self) {
447
447
  VALUE matrix, dest;
448
448
  rb_scan_args(argc, argv, "11", &matrix, &dest);
449
449
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
450
- glm_vec_rotate_m4(VAL2MAT4(matrix), VAL2VEC3(self), VAL2VEC3(dest));
450
+ glm_vec3_rotate_m4(VAL2MAT4(matrix), VAL2VEC3(self), VAL2VEC3(dest));
451
451
  return dest;
452
452
  }
453
453
 
@@ -464,7 +464,7 @@ VALUE rb_cglm_vec3_rotate_mat4(int argc, VALUE *argv, VALUE self) {
464
464
  * 0 0 0 w
465
465
  */
466
466
  VALUE rb_cglm_vec3_rotate_mat4_self(VALUE self, VALUE matrix) {
467
- glm_vec_rotate_m4(VAL2MAT4(matrix), VAL2VEC3(self), VAL2VEC3(self));
467
+ glm_vec3_rotate_m4(VAL2MAT4(matrix), VAL2VEC3(self), VAL2VEC3(self));
468
468
  return self;
469
469
  }
470
470
 
@@ -478,7 +478,7 @@ VALUE rb_cglm_vec3_rotate_mat3(int argc, VALUE *argv, VALUE self) {
478
478
  VALUE matrix, dest;
479
479
  rb_scan_args(argc, argv, "11", &matrix, &dest);
480
480
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
481
- glm_vec_rotate_m3(VAL2MAT3(matrix), VAL2VEC3(self), VAL2VEC3(dest));
481
+ glm_vec3_rotate_m3(VAL2MAT3(matrix), VAL2VEC3(self), VAL2VEC3(dest));
482
482
  return dest;
483
483
  }
484
484
 
@@ -488,7 +488,7 @@ VALUE rb_cglm_vec3_rotate_mat3(int argc, VALUE *argv, VALUE self) {
488
488
  * `self` and returns `self`.
489
489
  */
490
490
  VALUE rb_cglm_vec3_rotate_mat3_self(VALUE self, VALUE matrix) {
491
- glm_vec_rotate_m3(VAL2MAT3(matrix), VAL2VEC3(self), VAL2VEC3(self));
491
+ glm_vec3_rotate_m3(VAL2MAT3(matrix), VAL2VEC3(self), VAL2VEC3(self));
492
492
  return self;
493
493
  }
494
494
 
@@ -501,7 +501,7 @@ VALUE rb_cglm_vec3_project(int argc, VALUE *argv, VALUE self) {
501
501
  VALUE b, dest;
502
502
  rb_scan_args(argc, argv, "11", &b, &dest);
503
503
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
504
- glm_vec_proj(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
504
+ glm_vec3_proj(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
505
505
  return dest;
506
506
  }
507
507
 
@@ -511,7 +511,7 @@ VALUE rb_cglm_vec3_project(int argc, VALUE *argv, VALUE self) {
511
511
  * returns `self`.
512
512
  */
513
513
  VALUE rb_cglm_vec3_project_self(VALUE self, VALUE b) {
514
- glm_vec_proj(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
514
+ glm_vec3_proj(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(self));
515
515
  return self;
516
516
  }
517
517
 
@@ -525,7 +525,7 @@ VALUE rb_cglm_vec3_center(int argc, VALUE *argv, VALUE self) {
525
525
  VALUE b, dest;
526
526
  rb_scan_args(argc, argv, "11", &b, &dest);
527
527
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
528
- glm_vec_center(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
528
+ glm_vec3_center(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
529
529
  return dest;
530
530
  }
531
531
 
@@ -534,7 +534,7 @@ VALUE rb_cglm_vec3_center(int argc, VALUE *argv, VALUE self) {
534
534
  * Returns the squared distance between this vector and the specified one.
535
535
  */
536
536
  VALUE rb_cglm_vec3_distance2(VALUE self, VALUE b) {
537
- return DBL2NUM(glm_vec_distance2(VAL2VEC3(self), VAL2VEC3(b)));
537
+ return DBL2NUM(glm_vec3_distance2(VAL2VEC3(self), VAL2VEC3(b)));
538
538
  }
539
539
 
540
540
  /* call-seq: distance(vec) => Numeric
@@ -542,7 +542,7 @@ VALUE rb_cglm_vec3_distance2(VALUE self, VALUE b) {
542
542
  * Returns the distance between this vector and the specified one.
543
543
  */
544
544
  VALUE rb_cglm_vec3_distance(VALUE self, VALUE b) {
545
- return DBL2NUM(glm_vec_distance(VAL2VEC3(self), VAL2VEC3(b)));
545
+ return DBL2NUM(glm_vec3_distance(VAL2VEC3(self), VAL2VEC3(b)));
546
546
  }
547
547
 
548
548
  /* call-seq: max(vec[, dest]) => dest | new Vec3
@@ -555,7 +555,7 @@ VALUE rb_cglm_vec3_max(int argc, VALUE *argv, VALUE self) {
555
555
  VALUE b, dest;
556
556
  rb_scan_args(argc, argv, "11", &b, &dest);
557
557
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
558
- glm_vec_maxv(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
558
+ glm_vec3_maxv(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
559
559
  return dest;
560
560
  }
561
561
 
@@ -569,7 +569,7 @@ VALUE rb_cglm_vec3_min(int argc, VALUE *argv, VALUE self) {
569
569
  VALUE b, dest;
570
570
  rb_scan_args(argc, argv, "11", &b, &dest);
571
571
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
572
- glm_vec_minv(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
572
+ glm_vec3_minv(VAL2VEC3(self), VAL2VEC3(b), VAL2VEC3(dest));
573
573
  return dest;
574
574
  }
575
575
 
@@ -583,7 +583,7 @@ VALUE rb_cglm_vec3_ortho(int argc, VALUE *argv, VALUE self) {
583
583
  VALUE dest;
584
584
  rb_scan_args(argc, argv, "01", &dest);
585
585
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
586
- glm_vec_ortho(VAL2VEC3(self), VAL2VEC3(dest));
586
+ glm_vec3_ortho(VAL2VEC3(self), VAL2VEC3(dest));
587
587
  return dest;
588
588
  }
589
589
 
@@ -598,7 +598,7 @@ VALUE rb_cglm_vec3_clamp_scalar(int argc, VALUE *argv, VALUE self) {
598
598
  rb_scan_args(argc, argv, "21", &a, &b, &dest);
599
599
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
600
600
  memcpy(&VAL2VEC3(dest), &VAL2VEC3(self), sizeof(vec3));
601
- glm_vec_clamp(VAL2VEC3(dest), NUM2FLT(a), NUM2FLT(b));
601
+ glm_vec3_clamp(VAL2VEC3(dest), NUM2FLT(a), NUM2FLT(b));
602
602
  return dest;
603
603
  }
604
604
 
@@ -608,7 +608,7 @@ VALUE rb_cglm_vec3_clamp_scalar(int argc, VALUE *argv, VALUE self) {
608
608
  * Places the result into `self` and returns `self`.
609
609
  */
610
610
  VALUE rb_cglm_vec3_clamp_scalar_self(VALUE self, VALUE a, VALUE b) {
611
- glm_vec_clamp(VAL2VEC3(self), NUM2FLT(a), NUM2FLT(b));
611
+ glm_vec3_clamp(VAL2VEC3(self), NUM2FLT(a), NUM2FLT(b));
612
612
  return self;
613
613
  }
614
614
 
@@ -619,7 +619,7 @@ VALUE rb_cglm_vec3_clamp_scalar_self(VALUE self, VALUE a, VALUE b) {
619
619
  * `self` in-place and returns `self`.
620
620
  */
621
621
  VALUE rb_cglm_vec3_lerp_self(VALUE self, VALUE from, VALUE to, VALUE amount) {
622
- glm_vec_lerp(VAL2VEC3(from), VAL2VEC3(to), NUM2FLT(amount), VAL2VEC3(self));
622
+ glm_vec3_lerp(VAL2VEC3(from), VAL2VEC3(to), NUM2FLT(amount), VAL2VEC3(self));
623
623
  return self;
624
624
  }
625
625
 
@@ -629,7 +629,7 @@ VALUE rb_cglm_vec3_lerp_self(VALUE self, VALUE from, VALUE to, VALUE amount) {
629
629
  * `self`.
630
630
  */
631
631
  VALUE rb_cglm_vec3_broadcast_self(VALUE self, VALUE val) {
632
- glm_vec_broadcast(NUM2FLT(val), VAL2VEC3(self));
632
+ glm_vec3_broadcast(NUM2FLT(val), VAL2VEC3(self));
633
633
  return self;
634
634
  }
635
635
 
@@ -639,7 +639,7 @@ VALUE rb_cglm_vec3_broadcast_self(VALUE self, VALUE val) {
639
639
  * this Vec3, false otherwise.
640
640
  */
641
641
  VALUE rb_cglm_vec3_equals_scalar(VALUE self, VALUE val) {
642
- return glm_vec_eq(VAL2VEC3(self), NUM2FLT(val)) ? Qtrue : Qfalse;
642
+ return glm_vec3_eq(VAL2VEC3(self), NUM2FLT(val)) ? Qtrue : Qfalse;
643
643
  }
644
644
 
645
645
  /* call-seq: equalish_scalar(val[, epsilon]) => true|false
@@ -665,7 +665,7 @@ VALUE rb_cglm_vec3_equalish_scalar(int argc, VALUE *argv, VALUE self) {
665
665
  * Returns true if each component in this Vec3 has the same exact value.
666
666
  */
667
667
  VALUE rb_cglm_vec3_equals_all(VALUE self) {
668
- return glm_vec_eq_all(VAL2VEC3(self)) ? Qtrue : Qfalse;
668
+ return glm_vec3_eq_all(VAL2VEC3(self)) ? Qtrue : Qfalse;
669
669
  }
670
670
 
671
671
  /* call-seq: equals_vec3(other) => true|false
@@ -673,7 +673,7 @@ VALUE rb_cglm_vec3_equals_all(VALUE self) {
673
673
  * Returns true if this vector exactly matches the given one.
674
674
  */
675
675
  VALUE rb_cglm_vec3_equals_vec3(VALUE self, VALUE other) {
676
- return glm_vec_eqv(VAL2VEC3(self), VAL2VEC3(other)) ? Qtrue : Qfalse;
676
+ return glm_vec3_eqv(VAL2VEC3(self), VAL2VEC3(other)) ? Qtrue : Qfalse;
677
677
  }
678
678
 
679
679
  /* call-seq: equalish_vec3(other[, epsilon]) => true|false
@@ -698,7 +698,7 @@ VALUE rb_cglm_vec3_equalish_vec3(int argc, VALUE *argv, VALUE self) {
698
698
  * Returns the value of the highest component in this Vec3.
699
699
  */
700
700
  VALUE rb_cglm_vec3_highest(VALUE self) {
701
- return DBL2NUM(glm_vec_max(VAL2VEC3(self)));
701
+ return DBL2NUM(glm_vec3_max(VAL2VEC3(self)));
702
702
  }
703
703
 
704
704
  /* call-seq: lowest => Numeric
@@ -706,7 +706,7 @@ VALUE rb_cglm_vec3_highest(VALUE self) {
706
706
  * Returns the value of the lowest component in this Vec3.
707
707
  */
708
708
  VALUE rb_cglm_vec3_lowest(VALUE self) {
709
- return DBL2NUM(glm_vec_min(VAL2VEC3(self)));
709
+ return DBL2NUM(glm_vec3_min(VAL2VEC3(self)));
710
710
  }
711
711
 
712
712
  /* call-seq: nan? => true|false
@@ -715,7 +715,7 @@ VALUE rb_cglm_vec3_lowest(VALUE self) {
715
715
  * You should only use this in DEBUG mode or very critical asserts.
716
716
  */
717
717
  VALUE rb_cglm_vec3_is_nan(VALUE self) {
718
- return glm_vec_isnan(VAL2VEC3(self)) ? Qtrue : Qfalse;
718
+ return glm_vec3_isnan(VAL2VEC3(self)) ? Qtrue : Qfalse;
719
719
  }
720
720
 
721
721
  /* call-seq: inf? => true|false
@@ -724,7 +724,7 @@ VALUE rb_cglm_vec3_is_nan(VALUE self) {
724
724
  * You should only use this in DEBUG mode or very critical asserts.
725
725
  */
726
726
  VALUE rb_cglm_vec3_is_inf(VALUE self) {
727
- return glm_vec_isinf(VAL2VEC3(self)) ? Qtrue : Qfalse;
727
+ return glm_vec3_isinf(VAL2VEC3(self)) ? Qtrue : Qfalse;
728
728
  }
729
729
 
730
730
  /* call-seq: valid? => true|false
@@ -733,7 +733,7 @@ VALUE rb_cglm_vec3_is_inf(VALUE self) {
733
733
  * otherwise. You should only use this in DEBUG mode or very critical asserts.
734
734
  */
735
735
  VALUE rb_cglm_vec3_is_valid(VALUE self) {
736
- return glm_vec_isvalid(VAL2VEC3(self)) ? Qtrue : Qfalse;
736
+ return glm_vec3_isvalid(VAL2VEC3(self)) ? Qtrue : Qfalse;
737
737
  }
738
738
 
739
739
  /* call-seq: signs([dest]) => dest | new Vec3
@@ -746,7 +746,7 @@ VALUE rb_cglm_vec3_signs(int argc, VALUE *argv, VALUE self) {
746
746
  VALUE dest;
747
747
  rb_scan_args(argc, argv, "01", &dest);
748
748
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
749
- glm_vec_sign(VAL2VEC3(self), VAL2VEC3(dest));
749
+ glm_vec3_sign(VAL2VEC3(self), VAL2VEC3(dest));
750
750
  return dest;
751
751
  }
752
752
 
@@ -759,7 +759,7 @@ VALUE rb_cglm_vec3_sqrt(int argc, VALUE *argv, VALUE self) {
759
759
  VALUE dest;
760
760
  rb_scan_args(argc, argv, "01", &dest);
761
761
  if (NIL_P(dest)) dest = VEC3_NEW(ALLOC_VEC3);
762
- glm_vec_sqrt(VAL2VEC3(self), VAL2VEC3(dest));
762
+ glm_vec3_sqrt(VAL2VEC3(self), VAL2VEC3(dest));
763
763
  return dest;
764
764
  }
765
765
 
@@ -865,6 +865,8 @@ void Init_cglm_vec3() {
865
865
 
866
866
  rb_define_alias(rb_cVec3, "invert", "flip_signs");
867
867
  rb_define_alias(rb_cVec3, "invert!", "flip_signs!");
868
+ rb_define_alias(rb_cVec3, "negate", "flip_signs");
869
+ rb_define_alias(rb_cVec3, "negate!", "flip_signs!");
868
870
  rb_define_alias(rb_cVec3, "magnitude", "norm");
869
871
  rb_define_alias(rb_cVec3, "mag", "norm");
870
872
  rb_define_alias(rb_cVec3, "magnitude2", "norm2");
@@ -711,6 +711,8 @@ void Init_cglm_vec4() {
711
711
 
712
712
  rb_define_alias(rb_cVec4, "invert", "flip_signs");
713
713
  rb_define_alias(rb_cVec4, "invert!", "flip_signs!");
714
+ rb_define_alias(rb_cVec4, "negate", "flip_signs");
715
+ rb_define_alias(rb_cVec4, "negate!", "flip_signs!");
714
716
  rb_define_alias(rb_cVec4, "magnitude", "norm");
715
717
  rb_define_alias(rb_cVec4, "mag", "norm");
716
718