raylib-bindings 0.7.8-aarch64-linux → 0.7.10-aarch64-linux

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.
data/lib/raymath.rb CHANGED
@@ -1,1060 +1,1067 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] Autogenerated. Do not edit.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
-
12
- # Define/Macro
13
-
14
- EPSILON = 0.000001
15
-
16
- # Typedef
17
-
18
-
19
- # Struct
20
-
21
- # NOTE: Helper types to be used instead of array return types for *ToFloat functions
22
- class Float3 < FFI::Struct
23
- layout(
24
- :v, [:float, 3],
25
- )
26
- def v = self[:v]
27
- def v=(v) self[:v] = v end
28
- end
29
-
30
- class Float16 < FFI::Struct
31
- layout(
32
- :v, [:float, 16],
33
- )
34
- def v = self[:v]
35
- def v=(v) self[:v] = v end
36
- end
37
-
38
-
39
- # Function
40
-
41
- def self.setup_raymath_symbols(method_naming: :original)
42
- entries = [
43
-
44
- # @!method Clamp(value, min, max)
45
- # Clamp
46
- # @param value [float]
47
- # @param min [float]
48
- # @param max [float]
49
- # @return [float]
50
- [:Clamp, :Clamp, [:float, :float, :float], :float],
51
-
52
- # @!method Lerp(start, end, amount)
53
- # Lerp
54
- # @param start [float]
55
- # @param end [float]
56
- # @param amount [float]
57
- # @return [float]
58
- [:Lerp, :Lerp, [:float, :float, :float], :float],
59
-
60
- # @!method Normalize(value, start, end)
61
- # Normalize
62
- # @param value [float]
63
- # @param start [float]
64
- # @param end [float]
65
- # @return [float]
66
- [:Normalize, :Normalize, [:float, :float, :float], :float],
67
-
68
- # @!method Remap(value, inputStart, inputEnd, outputStart, outputEnd)
69
- # Remap
70
- # @param value [float]
71
- # @param inputStart [float]
72
- # @param inputEnd [float]
73
- # @param outputStart [float]
74
- # @param outputEnd [float]
75
- # @return [float]
76
- [:Remap, :Remap, [:float, :float, :float, :float, :float], :float],
77
-
78
- # @!method Wrap(value, min, max)
79
- # Wrap
80
- # @param value [float]
81
- # @param min [float]
82
- # @param max [float]
83
- # @return [float]
84
- [:Wrap, :Wrap, [:float, :float, :float], :float],
85
-
86
- # @!method FloatEquals(x, y)
87
- # FloatEquals
88
- # @param x [float]
89
- # @param y [float]
90
- # @return [int]
91
- [:FloatEquals, :FloatEquals, [:float, :float], :int],
92
-
93
- # @!method Vector2Zero()
94
- # Vector2Zero
95
- # @return [Vector2]
96
- [:Vector2Zero, :Vector2Zero, [], Vector2.by_value],
97
-
98
- # @!method Vector2One()
99
- # Vector2One
100
- # @return [Vector2]
101
- [:Vector2One, :Vector2One, [], Vector2.by_value],
102
-
103
- # @!method Vector2Add(v1, v2)
104
- # Vector2Add
105
- # @param v1 [Vector2]
106
- # @param v2 [Vector2]
107
- # @return [Vector2]
108
- [:Vector2Add, :Vector2Add, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
109
-
110
- # @!method Vector2AddValue(v, add)
111
- # Vector2AddValue
112
- # @param v [Vector2]
113
- # @param add [float]
114
- # @return [Vector2]
115
- [:Vector2AddValue, :Vector2AddValue, [Vector2.by_value, :float], Vector2.by_value],
116
-
117
- # @!method Vector2Subtract(v1, v2)
118
- # Vector2Subtract
119
- # @param v1 [Vector2]
120
- # @param v2 [Vector2]
121
- # @return [Vector2]
122
- [:Vector2Subtract, :Vector2Subtract, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
123
-
124
- # @!method Vector2SubtractValue(v, sub)
125
- # Vector2SubtractValue
126
- # @param v [Vector2]
127
- # @param sub [float]
128
- # @return [Vector2]
129
- [:Vector2SubtractValue, :Vector2SubtractValue, [Vector2.by_value, :float], Vector2.by_value],
130
-
131
- # @!method Vector2Length(v)
132
- # Vector2Length
133
- # @param v [Vector2]
134
- # @return [float]
135
- [:Vector2Length, :Vector2Length, [Vector2.by_value], :float],
136
-
137
- # @!method Vector2LengthSqr(v)
138
- # Vector2LengthSqr
139
- # @param v [Vector2]
140
- # @return [float]
141
- [:Vector2LengthSqr, :Vector2LengthSqr, [Vector2.by_value], :float],
142
-
143
- # @!method Vector2DotProduct(v1, v2)
144
- # Vector2DotProduct
145
- # @param v1 [Vector2]
146
- # @param v2 [Vector2]
147
- # @return [float]
148
- [:Vector2DotProduct, :Vector2DotProduct, [Vector2.by_value, Vector2.by_value], :float],
149
-
150
- # @!method Vector2Distance(v1, v2)
151
- # Vector2Distance
152
- # @param v1 [Vector2]
153
- # @param v2 [Vector2]
154
- # @return [float]
155
- [:Vector2Distance, :Vector2Distance, [Vector2.by_value, Vector2.by_value], :float],
156
-
157
- # @!method Vector2DistanceSqr(v1, v2)
158
- # Vector2DistanceSqr
159
- # @param v1 [Vector2]
160
- # @param v2 [Vector2]
161
- # @return [float]
162
- [:Vector2DistanceSqr, :Vector2DistanceSqr, [Vector2.by_value, Vector2.by_value], :float],
163
-
164
- # @!method Vector2Angle(v1, v2)
165
- # Vector2Angle
166
- # @param v1 [Vector2]
167
- # @param v2 [Vector2]
168
- # @return [float]
169
- [:Vector2Angle, :Vector2Angle, [Vector2.by_value, Vector2.by_value], :float],
170
-
171
- # @!method Vector2LineAngle(start, end)
172
- # Vector2LineAngle
173
- # @param start [Vector2]
174
- # @param end [Vector2]
175
- # @return [float]
176
- [:Vector2LineAngle, :Vector2LineAngle, [Vector2.by_value, Vector2.by_value], :float],
177
-
178
- # @!method Vector2Scale(v, scale)
179
- # Vector2Scale
180
- # @param v [Vector2]
181
- # @param scale [float]
182
- # @return [Vector2]
183
- [:Vector2Scale, :Vector2Scale, [Vector2.by_value, :float], Vector2.by_value],
184
-
185
- # @!method Vector2Multiply(v1, v2)
186
- # Vector2Multiply
187
- # @param v1 [Vector2]
188
- # @param v2 [Vector2]
189
- # @return [Vector2]
190
- [:Vector2Multiply, :Vector2Multiply, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
191
-
192
- # @!method Vector2Negate(v)
193
- # Vector2Negate
194
- # @param v [Vector2]
195
- # @return [Vector2]
196
- [:Vector2Negate, :Vector2Negate, [Vector2.by_value], Vector2.by_value],
197
-
198
- # @!method Vector2Divide(v1, v2)
199
- # Vector2Divide
200
- # @param v1 [Vector2]
201
- # @param v2 [Vector2]
202
- # @return [Vector2]
203
- [:Vector2Divide, :Vector2Divide, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
204
-
205
- # @!method Vector2Normalize(v)
206
- # Vector2Normalize
207
- # @param v [Vector2]
208
- # @return [Vector2]
209
- [:Vector2Normalize, :Vector2Normalize, [Vector2.by_value], Vector2.by_value],
210
-
211
- # @!method Vector2Transform(v, mat)
212
- # Vector2Transform
213
- # @param v [Vector2]
214
- # @param mat [Matrix]
215
- # @return [Vector2]
216
- [:Vector2Transform, :Vector2Transform, [Vector2.by_value, Matrix.by_value], Vector2.by_value],
217
-
218
- # @!method Vector2Lerp(v1, v2, amount)
219
- # Vector2Lerp
220
- # @param v1 [Vector2]
221
- # @param v2 [Vector2]
222
- # @param amount [float]
223
- # @return [Vector2]
224
- [:Vector2Lerp, :Vector2Lerp, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
225
-
226
- # @!method Vector2Reflect(v, normal)
227
- # Vector2Reflect
228
- # @param v [Vector2]
229
- # @param normal [Vector2]
230
- # @return [Vector2]
231
- [:Vector2Reflect, :Vector2Reflect, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
232
-
233
- # @!method Vector2Min(v1, v2)
234
- # Vector2Min
235
- # @param v1 [Vector2]
236
- # @param v2 [Vector2]
237
- # @return [Vector2]
238
- [:Vector2Min, :Vector2Min, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
239
-
240
- # @!method Vector2Max(v1, v2)
241
- # Vector2Max
242
- # @param v1 [Vector2]
243
- # @param v2 [Vector2]
244
- # @return [Vector2]
245
- [:Vector2Max, :Vector2Max, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
246
-
247
- # @!method Vector2Rotate(v, angle)
248
- # Vector2Rotate
249
- # @param v [Vector2]
250
- # @param angle [float]
251
- # @return [Vector2]
252
- [:Vector2Rotate, :Vector2Rotate, [Vector2.by_value, :float], Vector2.by_value],
253
-
254
- # @!method Vector2MoveTowards(v, target, maxDistance)
255
- # Vector2MoveTowards
256
- # @param v [Vector2]
257
- # @param target [Vector2]
258
- # @param maxDistance [float]
259
- # @return [Vector2]
260
- [:Vector2MoveTowards, :Vector2MoveTowards, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
261
-
262
- # @!method Vector2Invert(v)
263
- # Vector2Invert
264
- # @param v [Vector2]
265
- # @return [Vector2]
266
- [:Vector2Invert, :Vector2Invert, [Vector2.by_value], Vector2.by_value],
267
-
268
- # @!method Vector2Clamp(v, min, max)
269
- # Vector2Clamp
270
- # @param v [Vector2]
271
- # @param min [Vector2]
272
- # @param max [Vector2]
273
- # @return [Vector2]
274
- [:Vector2Clamp, :Vector2Clamp, [Vector2.by_value, Vector2.by_value, Vector2.by_value], Vector2.by_value],
275
-
276
- # @!method Vector2ClampValue(v, min, max)
277
- # Vector2ClampValue
278
- # @param v [Vector2]
279
- # @param min [float]
280
- # @param max [float]
281
- # @return [Vector2]
282
- [:Vector2ClampValue, :Vector2ClampValue, [Vector2.by_value, :float, :float], Vector2.by_value],
283
-
284
- # @!method Vector2Equals(p, q)
285
- # Vector2Equals
286
- # @param p [Vector2]
287
- # @param q [Vector2]
288
- # @return [int]
289
- [:Vector2Equals, :Vector2Equals, [Vector2.by_value, Vector2.by_value], :int],
290
-
291
- # @!method Vector2Refract(v, n, r)
292
- # Vector2Refract
293
- # @param v [Vector2]
294
- # @param n [Vector2]
295
- # @param r [float]
296
- # @return [Vector2]
297
- [:Vector2Refract, :Vector2Refract, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
298
-
299
- # @!method Vector3Zero()
300
- # Vector3Zero
301
- # @return [Vector3]
302
- [:Vector3Zero, :Vector3Zero, [], Vector3.by_value],
303
-
304
- # @!method Vector3One()
305
- # Vector3One
306
- # @return [Vector3]
307
- [:Vector3One, :Vector3One, [], Vector3.by_value],
308
-
309
- # @!method Vector3Add(v1, v2)
310
- # Vector3Add
311
- # @param v1 [Vector3]
312
- # @param v2 [Vector3]
313
- # @return [Vector3]
314
- [:Vector3Add, :Vector3Add, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
315
-
316
- # @!method Vector3AddValue(v, add)
317
- # Vector3AddValue
318
- # @param v [Vector3]
319
- # @param add [float]
320
- # @return [Vector3]
321
- [:Vector3AddValue, :Vector3AddValue, [Vector3.by_value, :float], Vector3.by_value],
322
-
323
- # @!method Vector3Subtract(v1, v2)
324
- # Vector3Subtract
325
- # @param v1 [Vector3]
326
- # @param v2 [Vector3]
327
- # @return [Vector3]
328
- [:Vector3Subtract, :Vector3Subtract, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
329
-
330
- # @!method Vector3SubtractValue(v, sub)
331
- # Vector3SubtractValue
332
- # @param v [Vector3]
333
- # @param sub [float]
334
- # @return [Vector3]
335
- [:Vector3SubtractValue, :Vector3SubtractValue, [Vector3.by_value, :float], Vector3.by_value],
336
-
337
- # @!method Vector3Scale(v, scalar)
338
- # Vector3Scale
339
- # @param v [Vector3]
340
- # @param scalar [float]
341
- # @return [Vector3]
342
- [:Vector3Scale, :Vector3Scale, [Vector3.by_value, :float], Vector3.by_value],
343
-
344
- # @!method Vector3Multiply(v1, v2)
345
- # Vector3Multiply
346
- # @param v1 [Vector3]
347
- # @param v2 [Vector3]
348
- # @return [Vector3]
349
- [:Vector3Multiply, :Vector3Multiply, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
350
-
351
- # @!method Vector3CrossProduct(v1, v2)
352
- # Vector3CrossProduct
353
- # @param v1 [Vector3]
354
- # @param v2 [Vector3]
355
- # @return [Vector3]
356
- [:Vector3CrossProduct, :Vector3CrossProduct, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
357
-
358
- # @!method Vector3Perpendicular(v)
359
- # Vector3Perpendicular
360
- # @param v [Vector3]
361
- # @return [Vector3]
362
- [:Vector3Perpendicular, :Vector3Perpendicular, [Vector3.by_value], Vector3.by_value],
363
-
364
- # @!method Vector3Length(v)
365
- # Vector3Length
366
- # @param v [const Vector3]
367
- # @return [float]
368
- [:Vector3Length, :Vector3Length, [Vector3.by_value], :float],
369
-
370
- # @!method Vector3LengthSqr(v)
371
- # Vector3LengthSqr
372
- # @param v [const Vector3]
373
- # @return [float]
374
- [:Vector3LengthSqr, :Vector3LengthSqr, [Vector3.by_value], :float],
375
-
376
- # @!method Vector3DotProduct(v1, v2)
377
- # Vector3DotProduct
378
- # @param v1 [Vector3]
379
- # @param v2 [Vector3]
380
- # @return [float]
381
- [:Vector3DotProduct, :Vector3DotProduct, [Vector3.by_value, Vector3.by_value], :float],
382
-
383
- # @!method Vector3Distance(v1, v2)
384
- # Vector3Distance
385
- # @param v1 [Vector3]
386
- # @param v2 [Vector3]
387
- # @return [float]
388
- [:Vector3Distance, :Vector3Distance, [Vector3.by_value, Vector3.by_value], :float],
389
-
390
- # @!method Vector3DistanceSqr(v1, v2)
391
- # Vector3DistanceSqr
392
- # @param v1 [Vector3]
393
- # @param v2 [Vector3]
394
- # @return [float]
395
- [:Vector3DistanceSqr, :Vector3DistanceSqr, [Vector3.by_value, Vector3.by_value], :float],
396
-
397
- # @!method Vector3Angle(v1, v2)
398
- # Vector3Angle
399
- # @param v1 [Vector3]
400
- # @param v2 [Vector3]
401
- # @return [float]
402
- [:Vector3Angle, :Vector3Angle, [Vector3.by_value, Vector3.by_value], :float],
403
-
404
- # @!method Vector3Negate(v)
405
- # Vector3Negate
406
- # @param v [Vector3]
407
- # @return [Vector3]
408
- [:Vector3Negate, :Vector3Negate, [Vector3.by_value], Vector3.by_value],
409
-
410
- # @!method Vector3Divide(v1, v2)
411
- # Vector3Divide
412
- # @param v1 [Vector3]
413
- # @param v2 [Vector3]
414
- # @return [Vector3]
415
- [:Vector3Divide, :Vector3Divide, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
416
-
417
- # @!method Vector3Normalize(v)
418
- # Vector3Normalize
419
- # @param v [Vector3]
420
- # @return [Vector3]
421
- [:Vector3Normalize, :Vector3Normalize, [Vector3.by_value], Vector3.by_value],
422
-
423
- # @!method Vector3Project(v1, v2)
424
- # Vector3Project
425
- # @param v1 [Vector3]
426
- # @param v2 [Vector3]
427
- # @return [Vector3]
428
- [:Vector3Project, :Vector3Project, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
429
-
430
- # @!method Vector3Reject(v1, v2)
431
- # Vector3Reject
432
- # @param v1 [Vector3]
433
- # @param v2 [Vector3]
434
- # @return [Vector3]
435
- [:Vector3Reject, :Vector3Reject, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
436
-
437
- # @!method Vector3OrthoNormalize(v1, v2)
438
- # Vector3OrthoNormalize
439
- # @param v1 [Vector3 *]
440
- # @param v2 [Vector3 *]
441
- # @return [void]
442
- [:Vector3OrthoNormalize, :Vector3OrthoNormalize, [:pointer, :pointer], :void],
443
-
444
- # @!method Vector3Transform(v, mat)
445
- # Vector3Transform
446
- # @param v [Vector3]
447
- # @param mat [Matrix]
448
- # @return [Vector3]
449
- [:Vector3Transform, :Vector3Transform, [Vector3.by_value, Matrix.by_value], Vector3.by_value],
450
-
451
- # @!method Vector3RotateByQuaternion(v, q)
452
- # Vector3RotateByQuaternion
453
- # @param v [Vector3]
454
- # @param q [Quaternion]
455
- # @return [Vector3]
456
- [:Vector3RotateByQuaternion, :Vector3RotateByQuaternion, [Vector3.by_value, Quaternion.by_value], Vector3.by_value],
457
-
458
- # @!method Vector3RotateByAxisAngle(v, axis, angle)
459
- # Vector3RotateByAxisAngle
460
- # @param v [Vector3]
461
- # @param axis [Vector3]
462
- # @param angle [float]
463
- # @return [Vector3]
464
- [:Vector3RotateByAxisAngle, :Vector3RotateByAxisAngle, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
465
-
466
- # @!method Vector3MoveTowards(v, target, maxDistance)
467
- # Vector3MoveTowards
468
- # @param v [Vector3]
469
- # @param target [Vector3]
470
- # @param maxDistance [float]
471
- # @return [Vector3]
472
- [:Vector3MoveTowards, :Vector3MoveTowards, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
473
-
474
- # @!method Vector3Lerp(v1, v2, amount)
475
- # Vector3Lerp
476
- # @param v1 [Vector3]
477
- # @param v2 [Vector3]
478
- # @param amount [float]
479
- # @return [Vector3]
480
- [:Vector3Lerp, :Vector3Lerp, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
481
-
482
- # @!method Vector3CubicHermite(v1, tangent1, v2, tangent2, amount)
483
- # Vector3CubicHermite
484
- # @param v1 [Vector3]
485
- # @param tangent1 [Vector3]
486
- # @param v2 [Vector3]
487
- # @param tangent2 [Vector3]
488
- # @param amount [float]
489
- # @return [Vector3]
490
- [:Vector3CubicHermite, :Vector3CubicHermite, [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
491
-
492
- # @!method Vector3Reflect(v, normal)
493
- # Vector3Reflect
494
- # @param v [Vector3]
495
- # @param normal [Vector3]
496
- # @return [Vector3]
497
- [:Vector3Reflect, :Vector3Reflect, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
498
-
499
- # @!method Vector3Min(v1, v2)
500
- # Vector3Min
501
- # @param v1 [Vector3]
502
- # @param v2 [Vector3]
503
- # @return [Vector3]
504
- [:Vector3Min, :Vector3Min, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
505
-
506
- # @!method Vector3Max(v1, v2)
507
- # Vector3Max
508
- # @param v1 [Vector3]
509
- # @param v2 [Vector3]
510
- # @return [Vector3]
511
- [:Vector3Max, :Vector3Max, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
512
-
513
- # @!method Vector3Barycenter(p, a, b, c)
514
- # Vector3Barycenter
515
- # @param p [Vector3]
516
- # @param a [Vector3]
517
- # @param b [Vector3]
518
- # @param c [Vector3]
519
- # @return [Vector3]
520
- [:Vector3Barycenter, :Vector3Barycenter, [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
521
-
522
- # @!method Vector3Unproject(source, projection, view)
523
- # Vector3Unproject
524
- # @param source [Vector3]
525
- # @param projection [Matrix]
526
- # @param view [Matrix]
527
- # @return [Vector3]
528
- [:Vector3Unproject, :Vector3Unproject, [Vector3.by_value, Matrix.by_value, Matrix.by_value], Vector3.by_value],
529
-
530
- # @!method Vector3ToFloatV(v)
531
- # Vector3ToFloatV
532
- # @param v [Vector3]
533
- # @return [float3]
534
- [:Vector3ToFloatV, :Vector3ToFloatV, [Vector3.by_value], Float3.by_value],
535
-
536
- # @!method Vector3Invert(v)
537
- # Vector3Invert
538
- # @param v [Vector3]
539
- # @return [Vector3]
540
- [:Vector3Invert, :Vector3Invert, [Vector3.by_value], Vector3.by_value],
541
-
542
- # @!method Vector3Clamp(v, min, max)
543
- # Vector3Clamp
544
- # @param v [Vector3]
545
- # @param min [Vector3]
546
- # @param max [Vector3]
547
- # @return [Vector3]
548
- [:Vector3Clamp, :Vector3Clamp, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
549
-
550
- # @!method Vector3ClampValue(v, min, max)
551
- # Vector3ClampValue
552
- # @param v [Vector3]
553
- # @param min [float]
554
- # @param max [float]
555
- # @return [Vector3]
556
- [:Vector3ClampValue, :Vector3ClampValue, [Vector3.by_value, :float, :float], Vector3.by_value],
557
-
558
- # @!method Vector3Equals(p, q)
559
- # Vector3Equals
560
- # @param p [Vector3]
561
- # @param q [Vector3]
562
- # @return [int]
563
- [:Vector3Equals, :Vector3Equals, [Vector3.by_value, Vector3.by_value], :int],
564
-
565
- # @!method Vector3Refract(v, n, r)
566
- # Vector3Refract
567
- # @param v [Vector3]
568
- # @param n [Vector3]
569
- # @param r [float]
570
- # @return [Vector3]
571
- [:Vector3Refract, :Vector3Refract, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
572
-
573
- # @!method Vector4Zero()
574
- # Vector4Zero
575
- # @return [Vector4]
576
- [:Vector4Zero, :Vector4Zero, [], Vector4.by_value],
577
-
578
- # @!method Vector4One()
579
- # Vector4One
580
- # @return [Vector4]
581
- [:Vector4One, :Vector4One, [], Vector4.by_value],
582
-
583
- # @!method Vector4Add(v1, v2)
584
- # Vector4Add
585
- # @param v1 [Vector4]
586
- # @param v2 [Vector4]
587
- # @return [Vector4]
588
- [:Vector4Add, :Vector4Add, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
589
-
590
- # @!method Vector4AddValue(v, add)
591
- # Vector4AddValue
592
- # @param v [Vector4]
593
- # @param add [float]
594
- # @return [Vector4]
595
- [:Vector4AddValue, :Vector4AddValue, [Vector4.by_value, :float], Vector4.by_value],
596
-
597
- # @!method Vector4Subtract(v1, v2)
598
- # Vector4Subtract
599
- # @param v1 [Vector4]
600
- # @param v2 [Vector4]
601
- # @return [Vector4]
602
- [:Vector4Subtract, :Vector4Subtract, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
603
-
604
- # @!method Vector4SubtractValue(v, add)
605
- # Vector4SubtractValue
606
- # @param v [Vector4]
607
- # @param add [float]
608
- # @return [Vector4]
609
- [:Vector4SubtractValue, :Vector4SubtractValue, [Vector4.by_value, :float], Vector4.by_value],
610
-
611
- # @!method Vector4Length(v)
612
- # Vector4Length
613
- # @param v [Vector4]
614
- # @return [float]
615
- [:Vector4Length, :Vector4Length, [Vector4.by_value], :float],
616
-
617
- # @!method Vector4LengthSqr(v)
618
- # Vector4LengthSqr
619
- # @param v [Vector4]
620
- # @return [float]
621
- [:Vector4LengthSqr, :Vector4LengthSqr, [Vector4.by_value], :float],
622
-
623
- # @!method Vector4DotProduct(v1, v2)
624
- # Vector4DotProduct
625
- # @param v1 [Vector4]
626
- # @param v2 [Vector4]
627
- # @return [float]
628
- [:Vector4DotProduct, :Vector4DotProduct, [Vector4.by_value, Vector4.by_value], :float],
629
-
630
- # @!method Vector4Distance(v1, v2)
631
- # Vector4Distance
632
- # @param v1 [Vector4]
633
- # @param v2 [Vector4]
634
- # @return [float]
635
- [:Vector4Distance, :Vector4Distance, [Vector4.by_value, Vector4.by_value], :float],
636
-
637
- # @!method Vector4DistanceSqr(v1, v2)
638
- # Vector4DistanceSqr
639
- # @param v1 [Vector4]
640
- # @param v2 [Vector4]
641
- # @return [float]
642
- [:Vector4DistanceSqr, :Vector4DistanceSqr, [Vector4.by_value, Vector4.by_value], :float],
643
-
644
- # @!method Vector4Scale(v, scale)
645
- # Vector4Scale
646
- # @param v [Vector4]
647
- # @param scale [float]
648
- # @return [Vector4]
649
- [:Vector4Scale, :Vector4Scale, [Vector4.by_value, :float], Vector4.by_value],
650
-
651
- # @!method Vector4Multiply(v1, v2)
652
- # Vector4Multiply
653
- # @param v1 [Vector4]
654
- # @param v2 [Vector4]
655
- # @return [Vector4]
656
- [:Vector4Multiply, :Vector4Multiply, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
657
-
658
- # @!method Vector4Negate(v)
659
- # Vector4Negate
660
- # @param v [Vector4]
661
- # @return [Vector4]
662
- [:Vector4Negate, :Vector4Negate, [Vector4.by_value], Vector4.by_value],
663
-
664
- # @!method Vector4Divide(v1, v2)
665
- # Vector4Divide
666
- # @param v1 [Vector4]
667
- # @param v2 [Vector4]
668
- # @return [Vector4]
669
- [:Vector4Divide, :Vector4Divide, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
670
-
671
- # @!method Vector4Normalize(v)
672
- # Vector4Normalize
673
- # @param v [Vector4]
674
- # @return [Vector4]
675
- [:Vector4Normalize, :Vector4Normalize, [Vector4.by_value], Vector4.by_value],
676
-
677
- # @!method Vector4Min(v1, v2)
678
- # Vector4Min
679
- # @param v1 [Vector4]
680
- # @param v2 [Vector4]
681
- # @return [Vector4]
682
- [:Vector4Min, :Vector4Min, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
683
-
684
- # @!method Vector4Max(v1, v2)
685
- # Vector4Max
686
- # @param v1 [Vector4]
687
- # @param v2 [Vector4]
688
- # @return [Vector4]
689
- [:Vector4Max, :Vector4Max, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
690
-
691
- # @!method Vector4Lerp(v1, v2, amount)
692
- # Vector4Lerp
693
- # @param v1 [Vector4]
694
- # @param v2 [Vector4]
695
- # @param amount [float]
696
- # @return [Vector4]
697
- [:Vector4Lerp, :Vector4Lerp, [Vector4.by_value, Vector4.by_value, :float], Vector4.by_value],
698
-
699
- # @!method Vector4MoveTowards(v, target, maxDistance)
700
- # Vector4MoveTowards
701
- # @param v [Vector4]
702
- # @param target [Vector4]
703
- # @param maxDistance [float]
704
- # @return [Vector4]
705
- [:Vector4MoveTowards, :Vector4MoveTowards, [Vector4.by_value, Vector4.by_value, :float], Vector4.by_value],
706
-
707
- # @!method Vector4Invert(v)
708
- # Vector4Invert
709
- # @param v [Vector4]
710
- # @return [Vector4]
711
- [:Vector4Invert, :Vector4Invert, [Vector4.by_value], Vector4.by_value],
712
-
713
- # @!method Vector4Equals(p, q)
714
- # Vector4Equals
715
- # @param p [Vector4]
716
- # @param q [Vector4]
717
- # @return [int]
718
- [:Vector4Equals, :Vector4Equals, [Vector4.by_value, Vector4.by_value], :int],
719
-
720
- # @!method MatrixDeterminant(mat)
721
- # MatrixDeterminant
722
- # @param mat [Matrix]
723
- # @return [float]
724
- [:MatrixDeterminant, :MatrixDeterminant, [Matrix.by_value], :float],
725
-
726
- # @!method MatrixTrace(mat)
727
- # MatrixTrace
728
- # @param mat [Matrix]
729
- # @return [float]
730
- [:MatrixTrace, :MatrixTrace, [Matrix.by_value], :float],
731
-
732
- # @!method MatrixTranspose(mat)
733
- # MatrixTranspose
734
- # @param mat [Matrix]
735
- # @return [Matrix]
736
- [:MatrixTranspose, :MatrixTranspose, [Matrix.by_value], Matrix.by_value],
737
-
738
- # @!method MatrixInvert(mat)
739
- # MatrixInvert
740
- # @param mat [Matrix]
741
- # @return [Matrix]
742
- [:MatrixInvert, :MatrixInvert, [Matrix.by_value], Matrix.by_value],
743
-
744
- # @!method MatrixIdentity()
745
- # MatrixIdentity
746
- # @return [Matrix]
747
- [:MatrixIdentity, :MatrixIdentity, [], Matrix.by_value],
748
-
749
- # @!method MatrixAdd(left, right)
750
- # MatrixAdd
751
- # @param left [Matrix]
752
- # @param right [Matrix]
753
- # @return [Matrix]
754
- [:MatrixAdd, :MatrixAdd, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
755
-
756
- # @!method MatrixSubtract(left, right)
757
- # MatrixSubtract
758
- # @param left [Matrix]
759
- # @param right [Matrix]
760
- # @return [Matrix]
761
- [:MatrixSubtract, :MatrixSubtract, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
762
-
763
- # @!method MatrixMultiply(left, right)
764
- # MatrixMultiply
765
- # @param left [Matrix]
766
- # @param right [Matrix]
767
- # @return [Matrix]
768
- [:MatrixMultiply, :MatrixMultiply, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
769
-
770
- # @!method MatrixTranslate(x, y, z)
771
- # MatrixTranslate
772
- # @param x [float]
773
- # @param y [float]
774
- # @param z [float]
775
- # @return [Matrix]
776
- [:MatrixTranslate, :MatrixTranslate, [:float, :float, :float], Matrix.by_value],
777
-
778
- # @!method MatrixRotate(axis, angle)
779
- # MatrixRotate
780
- # @param axis [Vector3]
781
- # @param angle [float]
782
- # @return [Matrix]
783
- [:MatrixRotate, :MatrixRotate, [Vector3.by_value, :float], Matrix.by_value],
784
-
785
- # @!method MatrixRotateX(angle)
786
- # MatrixRotateX
787
- # @param angle [float]
788
- # @return [Matrix]
789
- [:MatrixRotateX, :MatrixRotateX, [:float], Matrix.by_value],
790
-
791
- # @!method MatrixRotateY(angle)
792
- # MatrixRotateY
793
- # @param angle [float]
794
- # @return [Matrix]
795
- [:MatrixRotateY, :MatrixRotateY, [:float], Matrix.by_value],
796
-
797
- # @!method MatrixRotateZ(angle)
798
- # MatrixRotateZ
799
- # @param angle [float]
800
- # @return [Matrix]
801
- [:MatrixRotateZ, :MatrixRotateZ, [:float], Matrix.by_value],
802
-
803
- # @!method MatrixRotateXYZ(angle)
804
- # MatrixRotateXYZ
805
- # @param angle [Vector3]
806
- # @return [Matrix]
807
- [:MatrixRotateXYZ, :MatrixRotateXYZ, [Vector3.by_value], Matrix.by_value],
808
-
809
- # @!method MatrixRotateZYX(angle)
810
- # MatrixRotateZYX
811
- # @param angle [Vector3]
812
- # @return [Matrix]
813
- [:MatrixRotateZYX, :MatrixRotateZYX, [Vector3.by_value], Matrix.by_value],
814
-
815
- # @!method MatrixScale(x, y, z)
816
- # MatrixScale
817
- # @param x [float]
818
- # @param y [float]
819
- # @param z [float]
820
- # @return [Matrix]
821
- [:MatrixScale, :MatrixScale, [:float, :float, :float], Matrix.by_value],
822
-
823
- # @!method MatrixFrustum(left, right, bottom, top, nearPlane, farPlane)
824
- # MatrixFrustum
825
- # @param left [double]
826
- # @param right [double]
827
- # @param bottom [double]
828
- # @param top [double]
829
- # @param nearPlane [double]
830
- # @param farPlane [double]
831
- # @return [Matrix]
832
- [:MatrixFrustum, :MatrixFrustum, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
833
-
834
- # @!method MatrixPerspective(fovY, aspect, nearPlane, farPlane)
835
- # MatrixPerspective
836
- # @param fovY [double]
837
- # @param aspect [double]
838
- # @param nearPlane [double]
839
- # @param farPlane [double]
840
- # @return [Matrix]
841
- [:MatrixPerspective, :MatrixPerspective, [:double, :double, :double, :double], Matrix.by_value],
842
-
843
- # @!method MatrixOrtho(left, right, bottom, top, nearPlane, farPlane)
844
- # MatrixOrtho
845
- # @param left [double]
846
- # @param right [double]
847
- # @param bottom [double]
848
- # @param top [double]
849
- # @param nearPlane [double]
850
- # @param farPlane [double]
851
- # @return [Matrix]
852
- [:MatrixOrtho, :MatrixOrtho, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
853
-
854
- # @!method MatrixLookAt(eye, target, up)
855
- # MatrixLookAt
856
- # @param eye [Vector3]
857
- # @param target [Vector3]
858
- # @param up [Vector3]
859
- # @return [Matrix]
860
- [:MatrixLookAt, :MatrixLookAt, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Matrix.by_value],
861
-
862
- # @!method MatrixToFloatV(mat)
863
- # MatrixToFloatV
864
- # @param mat [Matrix]
865
- # @return [float16]
866
- [:MatrixToFloatV, :MatrixToFloatV, [Matrix.by_value], Float16.by_value],
867
-
868
- # @!method QuaternionAdd(q1, q2)
869
- # QuaternionAdd
870
- # @param q1 [Quaternion]
871
- # @param q2 [Quaternion]
872
- # @return [Quaternion]
873
- [:QuaternionAdd, :QuaternionAdd, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
874
-
875
- # @!method QuaternionAddValue(q, add)
876
- # QuaternionAddValue
877
- # @param q [Quaternion]
878
- # @param add [float]
879
- # @return [Quaternion]
880
- [:QuaternionAddValue, :QuaternionAddValue, [Quaternion.by_value, :float], Quaternion.by_value],
881
-
882
- # @!method QuaternionSubtract(q1, q2)
883
- # QuaternionSubtract
884
- # @param q1 [Quaternion]
885
- # @param q2 [Quaternion]
886
- # @return [Quaternion]
887
- [:QuaternionSubtract, :QuaternionSubtract, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
888
-
889
- # @!method QuaternionSubtractValue(q, sub)
890
- # QuaternionSubtractValue
891
- # @param q [Quaternion]
892
- # @param sub [float]
893
- # @return [Quaternion]
894
- [:QuaternionSubtractValue, :QuaternionSubtractValue, [Quaternion.by_value, :float], Quaternion.by_value],
895
-
896
- # @!method QuaternionIdentity()
897
- # QuaternionIdentity
898
- # @return [Quaternion]
899
- [:QuaternionIdentity, :QuaternionIdentity, [], Quaternion.by_value],
900
-
901
- # @!method QuaternionLength(q)
902
- # QuaternionLength
903
- # @param q [Quaternion]
904
- # @return [float]
905
- [:QuaternionLength, :QuaternionLength, [Quaternion.by_value], :float],
906
-
907
- # @!method QuaternionNormalize(q)
908
- # QuaternionNormalize
909
- # @param q [Quaternion]
910
- # @return [Quaternion]
911
- [:QuaternionNormalize, :QuaternionNormalize, [Quaternion.by_value], Quaternion.by_value],
912
-
913
- # @!method QuaternionInvert(q)
914
- # QuaternionInvert
915
- # @param q [Quaternion]
916
- # @return [Quaternion]
917
- [:QuaternionInvert, :QuaternionInvert, [Quaternion.by_value], Quaternion.by_value],
918
-
919
- # @!method QuaternionMultiply(q1, q2)
920
- # QuaternionMultiply
921
- # @param q1 [Quaternion]
922
- # @param q2 [Quaternion]
923
- # @return [Quaternion]
924
- [:QuaternionMultiply, :QuaternionMultiply, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
925
-
926
- # @!method QuaternionScale(q, mul)
927
- # QuaternionScale
928
- # @param q [Quaternion]
929
- # @param mul [float]
930
- # @return [Quaternion]
931
- [:QuaternionScale, :QuaternionScale, [Quaternion.by_value, :float], Quaternion.by_value],
932
-
933
- # @!method QuaternionDivide(q1, q2)
934
- # QuaternionDivide
935
- # @param q1 [Quaternion]
936
- # @param q2 [Quaternion]
937
- # @return [Quaternion]
938
- [:QuaternionDivide, :QuaternionDivide, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
939
-
940
- # @!method QuaternionLerp(q1, q2, amount)
941
- # QuaternionLerp
942
- # @param q1 [Quaternion]
943
- # @param q2 [Quaternion]
944
- # @param amount [float]
945
- # @return [Quaternion]
946
- [:QuaternionLerp, :QuaternionLerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
947
-
948
- # @!method QuaternionNlerp(q1, q2, amount)
949
- # QuaternionNlerp
950
- # @param q1 [Quaternion]
951
- # @param q2 [Quaternion]
952
- # @param amount [float]
953
- # @return [Quaternion]
954
- [:QuaternionNlerp, :QuaternionNlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
955
-
956
- # @!method QuaternionSlerp(q1, q2, amount)
957
- # QuaternionSlerp
958
- # @param q1 [Quaternion]
959
- # @param q2 [Quaternion]
960
- # @param amount [float]
961
- # @return [Quaternion]
962
- [:QuaternionSlerp, :QuaternionSlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
963
-
964
- # @!method QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t)
965
- # QuaternionCubicHermiteSpline
966
- # @param q1 [Quaternion]
967
- # @param outTangent1 [Quaternion]
968
- # @param q2 [Quaternion]
969
- # @param inTangent2 [Quaternion]
970
- # @param t [float]
971
- # @return [Quaternion]
972
- [:QuaternionCubicHermiteSpline, :QuaternionCubicHermiteSpline, [Quaternion.by_value, Quaternion.by_value, Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
973
-
974
- # @!method QuaternionFromVector3ToVector3(from, to)
975
- # QuaternionFromVector3ToVector3
976
- # @param from [Vector3]
977
- # @param to [Vector3]
978
- # @return [Quaternion]
979
- [:QuaternionFromVector3ToVector3, :QuaternionFromVector3ToVector3, [Vector3.by_value, Vector3.by_value], Quaternion.by_value],
980
-
981
- # @!method QuaternionFromMatrix(mat)
982
- # QuaternionFromMatrix
983
- # @param mat [Matrix]
984
- # @return [Quaternion]
985
- [:QuaternionFromMatrix, :QuaternionFromMatrix, [Matrix.by_value], Quaternion.by_value],
986
-
987
- # @!method QuaternionToMatrix(q)
988
- # QuaternionToMatrix
989
- # @param q [Quaternion]
990
- # @return [Matrix]
991
- [:QuaternionToMatrix, :QuaternionToMatrix, [Quaternion.by_value], Matrix.by_value],
992
-
993
- # @!method QuaternionFromAxisAngle(axis, angle)
994
- # QuaternionFromAxisAngle
995
- # @param axis [Vector3]
996
- # @param angle [float]
997
- # @return [Quaternion]
998
- [:QuaternionFromAxisAngle, :QuaternionFromAxisAngle, [Vector3.by_value, :float], Quaternion.by_value],
999
-
1000
- # @!method QuaternionToAxisAngle(q, outAxis, outAngle)
1001
- # QuaternionToAxisAngle
1002
- # @param q [Quaternion]
1003
- # @param outAxis [Vector3 *]
1004
- # @param outAngle [float *]
1005
- # @return [void]
1006
- [:QuaternionToAxisAngle, :QuaternionToAxisAngle, [Quaternion.by_value, :pointer, :pointer], :void],
1007
-
1008
- # @!method QuaternionFromEuler(pitch, yaw, roll)
1009
- # QuaternionFromEuler
1010
- # @param pitch [float]
1011
- # @param yaw [float]
1012
- # @param roll [float]
1013
- # @return [Quaternion]
1014
- [:QuaternionFromEuler, :QuaternionFromEuler, [:float, :float, :float], Quaternion.by_value],
1015
-
1016
- # @!method QuaternionToEuler(q)
1017
- # QuaternionToEuler
1018
- # @param q [Quaternion]
1019
- # @return [Vector3]
1020
- [:QuaternionToEuler, :QuaternionToEuler, [Quaternion.by_value], Vector3.by_value],
1021
-
1022
- # @!method QuaternionTransform(q, mat)
1023
- # QuaternionTransform
1024
- # @param q [Quaternion]
1025
- # @param mat [Matrix]
1026
- # @return [Quaternion]
1027
- [:QuaternionTransform, :QuaternionTransform, [Quaternion.by_value, Matrix.by_value], Quaternion.by_value],
1028
-
1029
- # @!method QuaternionEquals(p, q)
1030
- # QuaternionEquals
1031
- # @param p [Quaternion]
1032
- # @param q [Quaternion]
1033
- # @return [int]
1034
- [:QuaternionEquals, :QuaternionEquals, [Quaternion.by_value, Quaternion.by_value], :int],
1035
-
1036
- # @!method MatrixDecompose(mat, translation, rotation, scale)
1037
- # MatrixDecompose
1038
- # @param mat [Matrix]
1039
- # @param translation [Vector3 *]
1040
- # @param rotation [Quaternion *]
1041
- # @param scale [Vector3 *]
1042
- # @return [void]
1043
- [:MatrixDecompose, :MatrixDecompose, [Matrix.by_value, :pointer, :pointer, :pointer], :void],
1044
- ]
1045
- entries.each do |entry|
1046
- api_name = if method_naming == :snake_case
1047
- snake_case_name = entry[0].to_s.gsub(/([A-Z]+)([A-Z0-9][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z0-9])/, '\1_\2').downcase
1048
- snake_case_name.gsub!('vector_3', 'vector3_') if snake_case_name.include?('vector_3')
1049
- snake_case_name.gsub!('vector_2', 'vector2_') if snake_case_name.include?('vector_2')
1050
- snake_case_name.chop! if snake_case_name.end_with?('_')
1051
- snake_case_name.to_sym
1052
- else
1053
- entry[0]
1054
- end
1055
- attach_function api_name, entry[1], entry[2], entry[3]
1056
- rescue FFI::NotFoundError => e
1057
- warn "[Warning] Failed to import #{entry[0]} (#{e})."
1058
- end
1059
- end
1060
- end
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+ EPSILON = 0.000001
15
+
16
+ # Typedef
17
+
18
+
19
+ # Struct
20
+
21
+ # NOTE: Helper types to be used instead of array return types for *ToFloat functions
22
+ class Float3 < FFI::Struct
23
+ layout(
24
+ :v, [:float, 3],
25
+ )
26
+ def v = self[:v]
27
+ def v=(v) self[:v] = v end
28
+ end
29
+
30
+ class Float16 < FFI::Struct
31
+ layout(
32
+ :v, [:float, 16],
33
+ )
34
+ def v = self[:v]
35
+ def v=(v) self[:v] = v end
36
+ end
37
+
38
+
39
+ # Function
40
+
41
+ def self.setup_raymath_symbols(method_naming: :original)
42
+ entries = [
43
+
44
+ # @!method Clamp(value, min, max)
45
+ # Clamp
46
+ # @param value [float]
47
+ # @param min [float]
48
+ # @param max [float]
49
+ # @return [float]
50
+ [:Clamp, :Clamp, [:float, :float, :float], :float],
51
+
52
+ # @!method Lerp(start, end, amount)
53
+ # Lerp
54
+ # @param start [float]
55
+ # @param end [float]
56
+ # @param amount [float]
57
+ # @return [float]
58
+ [:Lerp, :Lerp, [:float, :float, :float], :float],
59
+
60
+ # @!method Normalize(value, start, end)
61
+ # Normalize
62
+ # @param value [float]
63
+ # @param start [float]
64
+ # @param end [float]
65
+ # @return [float]
66
+ [:Normalize, :Normalize, [:float, :float, :float], :float],
67
+
68
+ # @!method Remap(value, inputStart, inputEnd, outputStart, outputEnd)
69
+ # Remap
70
+ # @param value [float]
71
+ # @param inputStart [float]
72
+ # @param inputEnd [float]
73
+ # @param outputStart [float]
74
+ # @param outputEnd [float]
75
+ # @return [float]
76
+ [:Remap, :Remap, [:float, :float, :float, :float, :float], :float],
77
+
78
+ # @!method Wrap(value, min, max)
79
+ # Wrap
80
+ # @param value [float]
81
+ # @param min [float]
82
+ # @param max [float]
83
+ # @return [float]
84
+ [:Wrap, :Wrap, [:float, :float, :float], :float],
85
+
86
+ # @!method FloatEquals(x, y)
87
+ # FloatEquals
88
+ # @param x [float]
89
+ # @param y [float]
90
+ # @return [int]
91
+ [:FloatEquals, :FloatEquals, [:float, :float], :int],
92
+
93
+ # @!method Vector2Zero()
94
+ # Vector2Zero
95
+ # @return [Vector2]
96
+ [:Vector2Zero, :Vector2Zero, [], Vector2.by_value],
97
+
98
+ # @!method Vector2One()
99
+ # Vector2One
100
+ # @return [Vector2]
101
+ [:Vector2One, :Vector2One, [], Vector2.by_value],
102
+
103
+ # @!method Vector2Add(v1, v2)
104
+ # Vector2Add
105
+ # @param v1 [Vector2]
106
+ # @param v2 [Vector2]
107
+ # @return [Vector2]
108
+ [:Vector2Add, :Vector2Add, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
109
+
110
+ # @!method Vector2AddValue(v, add)
111
+ # Vector2AddValue
112
+ # @param v [Vector2]
113
+ # @param add [float]
114
+ # @return [Vector2]
115
+ [:Vector2AddValue, :Vector2AddValue, [Vector2.by_value, :float], Vector2.by_value],
116
+
117
+ # @!method Vector2Subtract(v1, v2)
118
+ # Vector2Subtract
119
+ # @param v1 [Vector2]
120
+ # @param v2 [Vector2]
121
+ # @return [Vector2]
122
+ [:Vector2Subtract, :Vector2Subtract, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
123
+
124
+ # @!method Vector2SubtractValue(v, sub)
125
+ # Vector2SubtractValue
126
+ # @param v [Vector2]
127
+ # @param sub [float]
128
+ # @return [Vector2]
129
+ [:Vector2SubtractValue, :Vector2SubtractValue, [Vector2.by_value, :float], Vector2.by_value],
130
+
131
+ # @!method Vector2Length(v)
132
+ # Vector2Length
133
+ # @param v [Vector2]
134
+ # @return [float]
135
+ [:Vector2Length, :Vector2Length, [Vector2.by_value], :float],
136
+
137
+ # @!method Vector2LengthSqr(v)
138
+ # Vector2LengthSqr
139
+ # @param v [Vector2]
140
+ # @return [float]
141
+ [:Vector2LengthSqr, :Vector2LengthSqr, [Vector2.by_value], :float],
142
+
143
+ # @!method Vector2DotProduct(v1, v2)
144
+ # Vector2DotProduct
145
+ # @param v1 [Vector2]
146
+ # @param v2 [Vector2]
147
+ # @return [float]
148
+ [:Vector2DotProduct, :Vector2DotProduct, [Vector2.by_value, Vector2.by_value], :float],
149
+
150
+ # @!method Vector2CrossProduct(v1, v2)
151
+ # Vector2CrossProduct
152
+ # @param v1 [Vector2]
153
+ # @param v2 [Vector2]
154
+ # @return [float]
155
+ [:Vector2CrossProduct, :Vector2CrossProduct, [Vector2.by_value, Vector2.by_value], :float],
156
+
157
+ # @!method Vector2Distance(v1, v2)
158
+ # Vector2Distance
159
+ # @param v1 [Vector2]
160
+ # @param v2 [Vector2]
161
+ # @return [float]
162
+ [:Vector2Distance, :Vector2Distance, [Vector2.by_value, Vector2.by_value], :float],
163
+
164
+ # @!method Vector2DistanceSqr(v1, v2)
165
+ # Vector2DistanceSqr
166
+ # @param v1 [Vector2]
167
+ # @param v2 [Vector2]
168
+ # @return [float]
169
+ [:Vector2DistanceSqr, :Vector2DistanceSqr, [Vector2.by_value, Vector2.by_value], :float],
170
+
171
+ # @!method Vector2Angle(v1, v2)
172
+ # Vector2Angle
173
+ # @param v1 [Vector2]
174
+ # @param v2 [Vector2]
175
+ # @return [float]
176
+ [:Vector2Angle, :Vector2Angle, [Vector2.by_value, Vector2.by_value], :float],
177
+
178
+ # @!method Vector2LineAngle(start, end)
179
+ # Vector2LineAngle
180
+ # @param start [Vector2]
181
+ # @param end [Vector2]
182
+ # @return [float]
183
+ [:Vector2LineAngle, :Vector2LineAngle, [Vector2.by_value, Vector2.by_value], :float],
184
+
185
+ # @!method Vector2Scale(v, scale)
186
+ # Vector2Scale
187
+ # @param v [Vector2]
188
+ # @param scale [float]
189
+ # @return [Vector2]
190
+ [:Vector2Scale, :Vector2Scale, [Vector2.by_value, :float], Vector2.by_value],
191
+
192
+ # @!method Vector2Multiply(v1, v2)
193
+ # Vector2Multiply
194
+ # @param v1 [Vector2]
195
+ # @param v2 [Vector2]
196
+ # @return [Vector2]
197
+ [:Vector2Multiply, :Vector2Multiply, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
198
+
199
+ # @!method Vector2Negate(v)
200
+ # Vector2Negate
201
+ # @param v [Vector2]
202
+ # @return [Vector2]
203
+ [:Vector2Negate, :Vector2Negate, [Vector2.by_value], Vector2.by_value],
204
+
205
+ # @!method Vector2Divide(v1, v2)
206
+ # Vector2Divide
207
+ # @param v1 [Vector2]
208
+ # @param v2 [Vector2]
209
+ # @return [Vector2]
210
+ [:Vector2Divide, :Vector2Divide, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
211
+
212
+ # @!method Vector2Normalize(v)
213
+ # Vector2Normalize
214
+ # @param v [Vector2]
215
+ # @return [Vector2]
216
+ [:Vector2Normalize, :Vector2Normalize, [Vector2.by_value], Vector2.by_value],
217
+
218
+ # @!method Vector2Transform(v, mat)
219
+ # Vector2Transform
220
+ # @param v [Vector2]
221
+ # @param mat [Matrix]
222
+ # @return [Vector2]
223
+ [:Vector2Transform, :Vector2Transform, [Vector2.by_value, Matrix.by_value], Vector2.by_value],
224
+
225
+ # @!method Vector2Lerp(v1, v2, amount)
226
+ # Vector2Lerp
227
+ # @param v1 [Vector2]
228
+ # @param v2 [Vector2]
229
+ # @param amount [float]
230
+ # @return [Vector2]
231
+ [:Vector2Lerp, :Vector2Lerp, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
232
+
233
+ # @!method Vector2Reflect(v, normal)
234
+ # Vector2Reflect
235
+ # @param v [Vector2]
236
+ # @param normal [Vector2]
237
+ # @return [Vector2]
238
+ [:Vector2Reflect, :Vector2Reflect, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
239
+
240
+ # @!method Vector2Min(v1, v2)
241
+ # Vector2Min
242
+ # @param v1 [Vector2]
243
+ # @param v2 [Vector2]
244
+ # @return [Vector2]
245
+ [:Vector2Min, :Vector2Min, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
246
+
247
+ # @!method Vector2Max(v1, v2)
248
+ # Vector2Max
249
+ # @param v1 [Vector2]
250
+ # @param v2 [Vector2]
251
+ # @return [Vector2]
252
+ [:Vector2Max, :Vector2Max, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
253
+
254
+ # @!method Vector2Rotate(v, angle)
255
+ # Vector2Rotate
256
+ # @param v [Vector2]
257
+ # @param angle [float]
258
+ # @return [Vector2]
259
+ [:Vector2Rotate, :Vector2Rotate, [Vector2.by_value, :float], Vector2.by_value],
260
+
261
+ # @!method Vector2MoveTowards(v, target, maxDistance)
262
+ # Vector2MoveTowards
263
+ # @param v [Vector2]
264
+ # @param target [Vector2]
265
+ # @param maxDistance [float]
266
+ # @return [Vector2]
267
+ [:Vector2MoveTowards, :Vector2MoveTowards, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
268
+
269
+ # @!method Vector2Invert(v)
270
+ # Vector2Invert
271
+ # @param v [Vector2]
272
+ # @return [Vector2]
273
+ [:Vector2Invert, :Vector2Invert, [Vector2.by_value], Vector2.by_value],
274
+
275
+ # @!method Vector2Clamp(v, min, max)
276
+ # Vector2Clamp
277
+ # @param v [Vector2]
278
+ # @param min [Vector2]
279
+ # @param max [Vector2]
280
+ # @return [Vector2]
281
+ [:Vector2Clamp, :Vector2Clamp, [Vector2.by_value, Vector2.by_value, Vector2.by_value], Vector2.by_value],
282
+
283
+ # @!method Vector2ClampValue(v, min, max)
284
+ # Vector2ClampValue
285
+ # @param v [Vector2]
286
+ # @param min [float]
287
+ # @param max [float]
288
+ # @return [Vector2]
289
+ [:Vector2ClampValue, :Vector2ClampValue, [Vector2.by_value, :float, :float], Vector2.by_value],
290
+
291
+ # @!method Vector2Equals(p, q)
292
+ # Vector2Equals
293
+ # @param p [Vector2]
294
+ # @param q [Vector2]
295
+ # @return [int]
296
+ [:Vector2Equals, :Vector2Equals, [Vector2.by_value, Vector2.by_value], :int],
297
+
298
+ # @!method Vector2Refract(v, n, r)
299
+ # Vector2Refract
300
+ # @param v [Vector2]
301
+ # @param n [Vector2]
302
+ # @param r [float]
303
+ # @return [Vector2]
304
+ [:Vector2Refract, :Vector2Refract, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
305
+
306
+ # @!method Vector3Zero()
307
+ # Vector3Zero
308
+ # @return [Vector3]
309
+ [:Vector3Zero, :Vector3Zero, [], Vector3.by_value],
310
+
311
+ # @!method Vector3One()
312
+ # Vector3One
313
+ # @return [Vector3]
314
+ [:Vector3One, :Vector3One, [], Vector3.by_value],
315
+
316
+ # @!method Vector3Add(v1, v2)
317
+ # Vector3Add
318
+ # @param v1 [Vector3]
319
+ # @param v2 [Vector3]
320
+ # @return [Vector3]
321
+ [:Vector3Add, :Vector3Add, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
322
+
323
+ # @!method Vector3AddValue(v, add)
324
+ # Vector3AddValue
325
+ # @param v [Vector3]
326
+ # @param add [float]
327
+ # @return [Vector3]
328
+ [:Vector3AddValue, :Vector3AddValue, [Vector3.by_value, :float], Vector3.by_value],
329
+
330
+ # @!method Vector3Subtract(v1, v2)
331
+ # Vector3Subtract
332
+ # @param v1 [Vector3]
333
+ # @param v2 [Vector3]
334
+ # @return [Vector3]
335
+ [:Vector3Subtract, :Vector3Subtract, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
336
+
337
+ # @!method Vector3SubtractValue(v, sub)
338
+ # Vector3SubtractValue
339
+ # @param v [Vector3]
340
+ # @param sub [float]
341
+ # @return [Vector3]
342
+ [:Vector3SubtractValue, :Vector3SubtractValue, [Vector3.by_value, :float], Vector3.by_value],
343
+
344
+ # @!method Vector3Scale(v, scalar)
345
+ # Vector3Scale
346
+ # @param v [Vector3]
347
+ # @param scalar [float]
348
+ # @return [Vector3]
349
+ [:Vector3Scale, :Vector3Scale, [Vector3.by_value, :float], Vector3.by_value],
350
+
351
+ # @!method Vector3Multiply(v1, v2)
352
+ # Vector3Multiply
353
+ # @param v1 [Vector3]
354
+ # @param v2 [Vector3]
355
+ # @return [Vector3]
356
+ [:Vector3Multiply, :Vector3Multiply, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
357
+
358
+ # @!method Vector3CrossProduct(v1, v2)
359
+ # Vector3CrossProduct
360
+ # @param v1 [Vector3]
361
+ # @param v2 [Vector3]
362
+ # @return [Vector3]
363
+ [:Vector3CrossProduct, :Vector3CrossProduct, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
364
+
365
+ # @!method Vector3Perpendicular(v)
366
+ # Vector3Perpendicular
367
+ # @param v [Vector3]
368
+ # @return [Vector3]
369
+ [:Vector3Perpendicular, :Vector3Perpendicular, [Vector3.by_value], Vector3.by_value],
370
+
371
+ # @!method Vector3Length(v)
372
+ # Vector3Length
373
+ # @param v [const Vector3]
374
+ # @return [float]
375
+ [:Vector3Length, :Vector3Length, [Vector3.by_value], :float],
376
+
377
+ # @!method Vector3LengthSqr(v)
378
+ # Vector3LengthSqr
379
+ # @param v [const Vector3]
380
+ # @return [float]
381
+ [:Vector3LengthSqr, :Vector3LengthSqr, [Vector3.by_value], :float],
382
+
383
+ # @!method Vector3DotProduct(v1, v2)
384
+ # Vector3DotProduct
385
+ # @param v1 [Vector3]
386
+ # @param v2 [Vector3]
387
+ # @return [float]
388
+ [:Vector3DotProduct, :Vector3DotProduct, [Vector3.by_value, Vector3.by_value], :float],
389
+
390
+ # @!method Vector3Distance(v1, v2)
391
+ # Vector3Distance
392
+ # @param v1 [Vector3]
393
+ # @param v2 [Vector3]
394
+ # @return [float]
395
+ [:Vector3Distance, :Vector3Distance, [Vector3.by_value, Vector3.by_value], :float],
396
+
397
+ # @!method Vector3DistanceSqr(v1, v2)
398
+ # Vector3DistanceSqr
399
+ # @param v1 [Vector3]
400
+ # @param v2 [Vector3]
401
+ # @return [float]
402
+ [:Vector3DistanceSqr, :Vector3DistanceSqr, [Vector3.by_value, Vector3.by_value], :float],
403
+
404
+ # @!method Vector3Angle(v1, v2)
405
+ # Vector3Angle
406
+ # @param v1 [Vector3]
407
+ # @param v2 [Vector3]
408
+ # @return [float]
409
+ [:Vector3Angle, :Vector3Angle, [Vector3.by_value, Vector3.by_value], :float],
410
+
411
+ # @!method Vector3Negate(v)
412
+ # Vector3Negate
413
+ # @param v [Vector3]
414
+ # @return [Vector3]
415
+ [:Vector3Negate, :Vector3Negate, [Vector3.by_value], Vector3.by_value],
416
+
417
+ # @!method Vector3Divide(v1, v2)
418
+ # Vector3Divide
419
+ # @param v1 [Vector3]
420
+ # @param v2 [Vector3]
421
+ # @return [Vector3]
422
+ [:Vector3Divide, :Vector3Divide, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
423
+
424
+ # @!method Vector3Normalize(v)
425
+ # Vector3Normalize
426
+ # @param v [Vector3]
427
+ # @return [Vector3]
428
+ [:Vector3Normalize, :Vector3Normalize, [Vector3.by_value], Vector3.by_value],
429
+
430
+ # @!method Vector3Project(v1, v2)
431
+ # Vector3Project
432
+ # @param v1 [Vector3]
433
+ # @param v2 [Vector3]
434
+ # @return [Vector3]
435
+ [:Vector3Project, :Vector3Project, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
436
+
437
+ # @!method Vector3Reject(v1, v2)
438
+ # Vector3Reject
439
+ # @param v1 [Vector3]
440
+ # @param v2 [Vector3]
441
+ # @return [Vector3]
442
+ [:Vector3Reject, :Vector3Reject, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
443
+
444
+ # @!method Vector3OrthoNormalize(v1, v2)
445
+ # Vector3OrthoNormalize
446
+ # @param v1 [Vector3 *]
447
+ # @param v2 [Vector3 *]
448
+ # @return [void]
449
+ [:Vector3OrthoNormalize, :Vector3OrthoNormalize, [:pointer, :pointer], :void],
450
+
451
+ # @!method Vector3Transform(v, mat)
452
+ # Vector3Transform
453
+ # @param v [Vector3]
454
+ # @param mat [Matrix]
455
+ # @return [Vector3]
456
+ [:Vector3Transform, :Vector3Transform, [Vector3.by_value, Matrix.by_value], Vector3.by_value],
457
+
458
+ # @!method Vector3RotateByQuaternion(v, q)
459
+ # Vector3RotateByQuaternion
460
+ # @param v [Vector3]
461
+ # @param q [Quaternion]
462
+ # @return [Vector3]
463
+ [:Vector3RotateByQuaternion, :Vector3RotateByQuaternion, [Vector3.by_value, Quaternion.by_value], Vector3.by_value],
464
+
465
+ # @!method Vector3RotateByAxisAngle(v, axis, angle)
466
+ # Vector3RotateByAxisAngle
467
+ # @param v [Vector3]
468
+ # @param axis [Vector3]
469
+ # @param angle [float]
470
+ # @return [Vector3]
471
+ [:Vector3RotateByAxisAngle, :Vector3RotateByAxisAngle, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
472
+
473
+ # @!method Vector3MoveTowards(v, target, maxDistance)
474
+ # Vector3MoveTowards
475
+ # @param v [Vector3]
476
+ # @param target [Vector3]
477
+ # @param maxDistance [float]
478
+ # @return [Vector3]
479
+ [:Vector3MoveTowards, :Vector3MoveTowards, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
480
+
481
+ # @!method Vector3Lerp(v1, v2, amount)
482
+ # Vector3Lerp
483
+ # @param v1 [Vector3]
484
+ # @param v2 [Vector3]
485
+ # @param amount [float]
486
+ # @return [Vector3]
487
+ [:Vector3Lerp, :Vector3Lerp, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
488
+
489
+ # @!method Vector3CubicHermite(v1, tangent1, v2, tangent2, amount)
490
+ # Vector3CubicHermite
491
+ # @param v1 [Vector3]
492
+ # @param tangent1 [Vector3]
493
+ # @param v2 [Vector3]
494
+ # @param tangent2 [Vector3]
495
+ # @param amount [float]
496
+ # @return [Vector3]
497
+ [:Vector3CubicHermite, :Vector3CubicHermite, [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
498
+
499
+ # @!method Vector3Reflect(v, normal)
500
+ # Vector3Reflect
501
+ # @param v [Vector3]
502
+ # @param normal [Vector3]
503
+ # @return [Vector3]
504
+ [:Vector3Reflect, :Vector3Reflect, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
505
+
506
+ # @!method Vector3Min(v1, v2)
507
+ # Vector3Min
508
+ # @param v1 [Vector3]
509
+ # @param v2 [Vector3]
510
+ # @return [Vector3]
511
+ [:Vector3Min, :Vector3Min, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
512
+
513
+ # @!method Vector3Max(v1, v2)
514
+ # Vector3Max
515
+ # @param v1 [Vector3]
516
+ # @param v2 [Vector3]
517
+ # @return [Vector3]
518
+ [:Vector3Max, :Vector3Max, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
519
+
520
+ # @!method Vector3Barycenter(p, a, b, c)
521
+ # Vector3Barycenter
522
+ # @param p [Vector3]
523
+ # @param a [Vector3]
524
+ # @param b [Vector3]
525
+ # @param c [Vector3]
526
+ # @return [Vector3]
527
+ [:Vector3Barycenter, :Vector3Barycenter, [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
528
+
529
+ # @!method Vector3Unproject(source, projection, view)
530
+ # Vector3Unproject
531
+ # @param source [Vector3]
532
+ # @param projection [Matrix]
533
+ # @param view [Matrix]
534
+ # @return [Vector3]
535
+ [:Vector3Unproject, :Vector3Unproject, [Vector3.by_value, Matrix.by_value, Matrix.by_value], Vector3.by_value],
536
+
537
+ # @!method Vector3ToFloatV(v)
538
+ # Vector3ToFloatV
539
+ # @param v [Vector3]
540
+ # @return [float3]
541
+ [:Vector3ToFloatV, :Vector3ToFloatV, [Vector3.by_value], Float3.by_value],
542
+
543
+ # @!method Vector3Invert(v)
544
+ # Vector3Invert
545
+ # @param v [Vector3]
546
+ # @return [Vector3]
547
+ [:Vector3Invert, :Vector3Invert, [Vector3.by_value], Vector3.by_value],
548
+
549
+ # @!method Vector3Clamp(v, min, max)
550
+ # Vector3Clamp
551
+ # @param v [Vector3]
552
+ # @param min [Vector3]
553
+ # @param max [Vector3]
554
+ # @return [Vector3]
555
+ [:Vector3Clamp, :Vector3Clamp, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
556
+
557
+ # @!method Vector3ClampValue(v, min, max)
558
+ # Vector3ClampValue
559
+ # @param v [Vector3]
560
+ # @param min [float]
561
+ # @param max [float]
562
+ # @return [Vector3]
563
+ [:Vector3ClampValue, :Vector3ClampValue, [Vector3.by_value, :float, :float], Vector3.by_value],
564
+
565
+ # @!method Vector3Equals(p, q)
566
+ # Vector3Equals
567
+ # @param p [Vector3]
568
+ # @param q [Vector3]
569
+ # @return [int]
570
+ [:Vector3Equals, :Vector3Equals, [Vector3.by_value, Vector3.by_value], :int],
571
+
572
+ # @!method Vector3Refract(v, n, r)
573
+ # Vector3Refract
574
+ # @param v [Vector3]
575
+ # @param n [Vector3]
576
+ # @param r [float]
577
+ # @return [Vector3]
578
+ [:Vector3Refract, :Vector3Refract, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
579
+
580
+ # @!method Vector4Zero()
581
+ # Vector4Zero
582
+ # @return [Vector4]
583
+ [:Vector4Zero, :Vector4Zero, [], Vector4.by_value],
584
+
585
+ # @!method Vector4One()
586
+ # Vector4One
587
+ # @return [Vector4]
588
+ [:Vector4One, :Vector4One, [], Vector4.by_value],
589
+
590
+ # @!method Vector4Add(v1, v2)
591
+ # Vector4Add
592
+ # @param v1 [Vector4]
593
+ # @param v2 [Vector4]
594
+ # @return [Vector4]
595
+ [:Vector4Add, :Vector4Add, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
596
+
597
+ # @!method Vector4AddValue(v, add)
598
+ # Vector4AddValue
599
+ # @param v [Vector4]
600
+ # @param add [float]
601
+ # @return [Vector4]
602
+ [:Vector4AddValue, :Vector4AddValue, [Vector4.by_value, :float], Vector4.by_value],
603
+
604
+ # @!method Vector4Subtract(v1, v2)
605
+ # Vector4Subtract
606
+ # @param v1 [Vector4]
607
+ # @param v2 [Vector4]
608
+ # @return [Vector4]
609
+ [:Vector4Subtract, :Vector4Subtract, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
610
+
611
+ # @!method Vector4SubtractValue(v, add)
612
+ # Vector4SubtractValue
613
+ # @param v [Vector4]
614
+ # @param add [float]
615
+ # @return [Vector4]
616
+ [:Vector4SubtractValue, :Vector4SubtractValue, [Vector4.by_value, :float], Vector4.by_value],
617
+
618
+ # @!method Vector4Length(v)
619
+ # Vector4Length
620
+ # @param v [Vector4]
621
+ # @return [float]
622
+ [:Vector4Length, :Vector4Length, [Vector4.by_value], :float],
623
+
624
+ # @!method Vector4LengthSqr(v)
625
+ # Vector4LengthSqr
626
+ # @param v [Vector4]
627
+ # @return [float]
628
+ [:Vector4LengthSqr, :Vector4LengthSqr, [Vector4.by_value], :float],
629
+
630
+ # @!method Vector4DotProduct(v1, v2)
631
+ # Vector4DotProduct
632
+ # @param v1 [Vector4]
633
+ # @param v2 [Vector4]
634
+ # @return [float]
635
+ [:Vector4DotProduct, :Vector4DotProduct, [Vector4.by_value, Vector4.by_value], :float],
636
+
637
+ # @!method Vector4Distance(v1, v2)
638
+ # Vector4Distance
639
+ # @param v1 [Vector4]
640
+ # @param v2 [Vector4]
641
+ # @return [float]
642
+ [:Vector4Distance, :Vector4Distance, [Vector4.by_value, Vector4.by_value], :float],
643
+
644
+ # @!method Vector4DistanceSqr(v1, v2)
645
+ # Vector4DistanceSqr
646
+ # @param v1 [Vector4]
647
+ # @param v2 [Vector4]
648
+ # @return [float]
649
+ [:Vector4DistanceSqr, :Vector4DistanceSqr, [Vector4.by_value, Vector4.by_value], :float],
650
+
651
+ # @!method Vector4Scale(v, scale)
652
+ # Vector4Scale
653
+ # @param v [Vector4]
654
+ # @param scale [float]
655
+ # @return [Vector4]
656
+ [:Vector4Scale, :Vector4Scale, [Vector4.by_value, :float], Vector4.by_value],
657
+
658
+ # @!method Vector4Multiply(v1, v2)
659
+ # Vector4Multiply
660
+ # @param v1 [Vector4]
661
+ # @param v2 [Vector4]
662
+ # @return [Vector4]
663
+ [:Vector4Multiply, :Vector4Multiply, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
664
+
665
+ # @!method Vector4Negate(v)
666
+ # Vector4Negate
667
+ # @param v [Vector4]
668
+ # @return [Vector4]
669
+ [:Vector4Negate, :Vector4Negate, [Vector4.by_value], Vector4.by_value],
670
+
671
+ # @!method Vector4Divide(v1, v2)
672
+ # Vector4Divide
673
+ # @param v1 [Vector4]
674
+ # @param v2 [Vector4]
675
+ # @return [Vector4]
676
+ [:Vector4Divide, :Vector4Divide, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
677
+
678
+ # @!method Vector4Normalize(v)
679
+ # Vector4Normalize
680
+ # @param v [Vector4]
681
+ # @return [Vector4]
682
+ [:Vector4Normalize, :Vector4Normalize, [Vector4.by_value], Vector4.by_value],
683
+
684
+ # @!method Vector4Min(v1, v2)
685
+ # Vector4Min
686
+ # @param v1 [Vector4]
687
+ # @param v2 [Vector4]
688
+ # @return [Vector4]
689
+ [:Vector4Min, :Vector4Min, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
690
+
691
+ # @!method Vector4Max(v1, v2)
692
+ # Vector4Max
693
+ # @param v1 [Vector4]
694
+ # @param v2 [Vector4]
695
+ # @return [Vector4]
696
+ [:Vector4Max, :Vector4Max, [Vector4.by_value, Vector4.by_value], Vector4.by_value],
697
+
698
+ # @!method Vector4Lerp(v1, v2, amount)
699
+ # Vector4Lerp
700
+ # @param v1 [Vector4]
701
+ # @param v2 [Vector4]
702
+ # @param amount [float]
703
+ # @return [Vector4]
704
+ [:Vector4Lerp, :Vector4Lerp, [Vector4.by_value, Vector4.by_value, :float], Vector4.by_value],
705
+
706
+ # @!method Vector4MoveTowards(v, target, maxDistance)
707
+ # Vector4MoveTowards
708
+ # @param v [Vector4]
709
+ # @param target [Vector4]
710
+ # @param maxDistance [float]
711
+ # @return [Vector4]
712
+ [:Vector4MoveTowards, :Vector4MoveTowards, [Vector4.by_value, Vector4.by_value, :float], Vector4.by_value],
713
+
714
+ # @!method Vector4Invert(v)
715
+ # Vector4Invert
716
+ # @param v [Vector4]
717
+ # @return [Vector4]
718
+ [:Vector4Invert, :Vector4Invert, [Vector4.by_value], Vector4.by_value],
719
+
720
+ # @!method Vector4Equals(p, q)
721
+ # Vector4Equals
722
+ # @param p [Vector4]
723
+ # @param q [Vector4]
724
+ # @return [int]
725
+ [:Vector4Equals, :Vector4Equals, [Vector4.by_value, Vector4.by_value], :int],
726
+
727
+ # @!method MatrixDeterminant(mat)
728
+ # MatrixDeterminant
729
+ # @param mat [Matrix]
730
+ # @return [float]
731
+ [:MatrixDeterminant, :MatrixDeterminant, [Matrix.by_value], :float],
732
+
733
+ # @!method MatrixTrace(mat)
734
+ # MatrixTrace
735
+ # @param mat [Matrix]
736
+ # @return [float]
737
+ [:MatrixTrace, :MatrixTrace, [Matrix.by_value], :float],
738
+
739
+ # @!method MatrixTranspose(mat)
740
+ # MatrixTranspose
741
+ # @param mat [Matrix]
742
+ # @return [Matrix]
743
+ [:MatrixTranspose, :MatrixTranspose, [Matrix.by_value], Matrix.by_value],
744
+
745
+ # @!method MatrixInvert(mat)
746
+ # MatrixInvert
747
+ # @param mat [Matrix]
748
+ # @return [Matrix]
749
+ [:MatrixInvert, :MatrixInvert, [Matrix.by_value], Matrix.by_value],
750
+
751
+ # @!method MatrixIdentity()
752
+ # MatrixIdentity
753
+ # @return [Matrix]
754
+ [:MatrixIdentity, :MatrixIdentity, [], Matrix.by_value],
755
+
756
+ # @!method MatrixAdd(left, right)
757
+ # MatrixAdd
758
+ # @param left [Matrix]
759
+ # @param right [Matrix]
760
+ # @return [Matrix]
761
+ [:MatrixAdd, :MatrixAdd, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
762
+
763
+ # @!method MatrixSubtract(left, right)
764
+ # MatrixSubtract
765
+ # @param left [Matrix]
766
+ # @param right [Matrix]
767
+ # @return [Matrix]
768
+ [:MatrixSubtract, :MatrixSubtract, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
769
+
770
+ # @!method MatrixMultiply(left, right)
771
+ # MatrixMultiply
772
+ # @param left [Matrix]
773
+ # @param right [Matrix]
774
+ # @return [Matrix]
775
+ [:MatrixMultiply, :MatrixMultiply, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
776
+
777
+ # @!method MatrixTranslate(x, y, z)
778
+ # MatrixTranslate
779
+ # @param x [float]
780
+ # @param y [float]
781
+ # @param z [float]
782
+ # @return [Matrix]
783
+ [:MatrixTranslate, :MatrixTranslate, [:float, :float, :float], Matrix.by_value],
784
+
785
+ # @!method MatrixRotate(axis, angle)
786
+ # MatrixRotate
787
+ # @param axis [Vector3]
788
+ # @param angle [float]
789
+ # @return [Matrix]
790
+ [:MatrixRotate, :MatrixRotate, [Vector3.by_value, :float], Matrix.by_value],
791
+
792
+ # @!method MatrixRotateX(angle)
793
+ # MatrixRotateX
794
+ # @param angle [float]
795
+ # @return [Matrix]
796
+ [:MatrixRotateX, :MatrixRotateX, [:float], Matrix.by_value],
797
+
798
+ # @!method MatrixRotateY(angle)
799
+ # MatrixRotateY
800
+ # @param angle [float]
801
+ # @return [Matrix]
802
+ [:MatrixRotateY, :MatrixRotateY, [:float], Matrix.by_value],
803
+
804
+ # @!method MatrixRotateZ(angle)
805
+ # MatrixRotateZ
806
+ # @param angle [float]
807
+ # @return [Matrix]
808
+ [:MatrixRotateZ, :MatrixRotateZ, [:float], Matrix.by_value],
809
+
810
+ # @!method MatrixRotateXYZ(angle)
811
+ # MatrixRotateXYZ
812
+ # @param angle [Vector3]
813
+ # @return [Matrix]
814
+ [:MatrixRotateXYZ, :MatrixRotateXYZ, [Vector3.by_value], Matrix.by_value],
815
+
816
+ # @!method MatrixRotateZYX(angle)
817
+ # MatrixRotateZYX
818
+ # @param angle [Vector3]
819
+ # @return [Matrix]
820
+ [:MatrixRotateZYX, :MatrixRotateZYX, [Vector3.by_value], Matrix.by_value],
821
+
822
+ # @!method MatrixScale(x, y, z)
823
+ # MatrixScale
824
+ # @param x [float]
825
+ # @param y [float]
826
+ # @param z [float]
827
+ # @return [Matrix]
828
+ [:MatrixScale, :MatrixScale, [:float, :float, :float], Matrix.by_value],
829
+
830
+ # @!method MatrixFrustum(left, right, bottom, top, nearPlane, farPlane)
831
+ # MatrixFrustum
832
+ # @param left [double]
833
+ # @param right [double]
834
+ # @param bottom [double]
835
+ # @param top [double]
836
+ # @param nearPlane [double]
837
+ # @param farPlane [double]
838
+ # @return [Matrix]
839
+ [:MatrixFrustum, :MatrixFrustum, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
840
+
841
+ # @!method MatrixPerspective(fovY, aspect, nearPlane, farPlane)
842
+ # MatrixPerspective
843
+ # @param fovY [double]
844
+ # @param aspect [double]
845
+ # @param nearPlane [double]
846
+ # @param farPlane [double]
847
+ # @return [Matrix]
848
+ [:MatrixPerspective, :MatrixPerspective, [:double, :double, :double, :double], Matrix.by_value],
849
+
850
+ # @!method MatrixOrtho(left, right, bottom, top, nearPlane, farPlane)
851
+ # MatrixOrtho
852
+ # @param left [double]
853
+ # @param right [double]
854
+ # @param bottom [double]
855
+ # @param top [double]
856
+ # @param nearPlane [double]
857
+ # @param farPlane [double]
858
+ # @return [Matrix]
859
+ [:MatrixOrtho, :MatrixOrtho, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
860
+
861
+ # @!method MatrixLookAt(eye, target, up)
862
+ # MatrixLookAt
863
+ # @param eye [Vector3]
864
+ # @param target [Vector3]
865
+ # @param up [Vector3]
866
+ # @return [Matrix]
867
+ [:MatrixLookAt, :MatrixLookAt, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Matrix.by_value],
868
+
869
+ # @!method MatrixToFloatV(mat)
870
+ # MatrixToFloatV
871
+ # @param mat [Matrix]
872
+ # @return [float16]
873
+ [:MatrixToFloatV, :MatrixToFloatV, [Matrix.by_value], Float16.by_value],
874
+
875
+ # @!method QuaternionAdd(q1, q2)
876
+ # QuaternionAdd
877
+ # @param q1 [Quaternion]
878
+ # @param q2 [Quaternion]
879
+ # @return [Quaternion]
880
+ [:QuaternionAdd, :QuaternionAdd, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
881
+
882
+ # @!method QuaternionAddValue(q, add)
883
+ # QuaternionAddValue
884
+ # @param q [Quaternion]
885
+ # @param add [float]
886
+ # @return [Quaternion]
887
+ [:QuaternionAddValue, :QuaternionAddValue, [Quaternion.by_value, :float], Quaternion.by_value],
888
+
889
+ # @!method QuaternionSubtract(q1, q2)
890
+ # QuaternionSubtract
891
+ # @param q1 [Quaternion]
892
+ # @param q2 [Quaternion]
893
+ # @return [Quaternion]
894
+ [:QuaternionSubtract, :QuaternionSubtract, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
895
+
896
+ # @!method QuaternionSubtractValue(q, sub)
897
+ # QuaternionSubtractValue
898
+ # @param q [Quaternion]
899
+ # @param sub [float]
900
+ # @return [Quaternion]
901
+ [:QuaternionSubtractValue, :QuaternionSubtractValue, [Quaternion.by_value, :float], Quaternion.by_value],
902
+
903
+ # @!method QuaternionIdentity()
904
+ # QuaternionIdentity
905
+ # @return [Quaternion]
906
+ [:QuaternionIdentity, :QuaternionIdentity, [], Quaternion.by_value],
907
+
908
+ # @!method QuaternionLength(q)
909
+ # QuaternionLength
910
+ # @param q [Quaternion]
911
+ # @return [float]
912
+ [:QuaternionLength, :QuaternionLength, [Quaternion.by_value], :float],
913
+
914
+ # @!method QuaternionNormalize(q)
915
+ # QuaternionNormalize
916
+ # @param q [Quaternion]
917
+ # @return [Quaternion]
918
+ [:QuaternionNormalize, :QuaternionNormalize, [Quaternion.by_value], Quaternion.by_value],
919
+
920
+ # @!method QuaternionInvert(q)
921
+ # QuaternionInvert
922
+ # @param q [Quaternion]
923
+ # @return [Quaternion]
924
+ [:QuaternionInvert, :QuaternionInvert, [Quaternion.by_value], Quaternion.by_value],
925
+
926
+ # @!method QuaternionMultiply(q1, q2)
927
+ # QuaternionMultiply
928
+ # @param q1 [Quaternion]
929
+ # @param q2 [Quaternion]
930
+ # @return [Quaternion]
931
+ [:QuaternionMultiply, :QuaternionMultiply, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
932
+
933
+ # @!method QuaternionScale(q, mul)
934
+ # QuaternionScale
935
+ # @param q [Quaternion]
936
+ # @param mul [float]
937
+ # @return [Quaternion]
938
+ [:QuaternionScale, :QuaternionScale, [Quaternion.by_value, :float], Quaternion.by_value],
939
+
940
+ # @!method QuaternionDivide(q1, q2)
941
+ # QuaternionDivide
942
+ # @param q1 [Quaternion]
943
+ # @param q2 [Quaternion]
944
+ # @return [Quaternion]
945
+ [:QuaternionDivide, :QuaternionDivide, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
946
+
947
+ # @!method QuaternionLerp(q1, q2, amount)
948
+ # QuaternionLerp
949
+ # @param q1 [Quaternion]
950
+ # @param q2 [Quaternion]
951
+ # @param amount [float]
952
+ # @return [Quaternion]
953
+ [:QuaternionLerp, :QuaternionLerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
954
+
955
+ # @!method QuaternionNlerp(q1, q2, amount)
956
+ # QuaternionNlerp
957
+ # @param q1 [Quaternion]
958
+ # @param q2 [Quaternion]
959
+ # @param amount [float]
960
+ # @return [Quaternion]
961
+ [:QuaternionNlerp, :QuaternionNlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
962
+
963
+ # @!method QuaternionSlerp(q1, q2, amount)
964
+ # QuaternionSlerp
965
+ # @param q1 [Quaternion]
966
+ # @param q2 [Quaternion]
967
+ # @param amount [float]
968
+ # @return [Quaternion]
969
+ [:QuaternionSlerp, :QuaternionSlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
970
+
971
+ # @!method QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t)
972
+ # QuaternionCubicHermiteSpline
973
+ # @param q1 [Quaternion]
974
+ # @param outTangent1 [Quaternion]
975
+ # @param q2 [Quaternion]
976
+ # @param inTangent2 [Quaternion]
977
+ # @param t [float]
978
+ # @return [Quaternion]
979
+ [:QuaternionCubicHermiteSpline, :QuaternionCubicHermiteSpline, [Quaternion.by_value, Quaternion.by_value, Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
980
+
981
+ # @!method QuaternionFromVector3ToVector3(from, to)
982
+ # QuaternionFromVector3ToVector3
983
+ # @param from [Vector3]
984
+ # @param to [Vector3]
985
+ # @return [Quaternion]
986
+ [:QuaternionFromVector3ToVector3, :QuaternionFromVector3ToVector3, [Vector3.by_value, Vector3.by_value], Quaternion.by_value],
987
+
988
+ # @!method QuaternionFromMatrix(mat)
989
+ # QuaternionFromMatrix
990
+ # @param mat [Matrix]
991
+ # @return [Quaternion]
992
+ [:QuaternionFromMatrix, :QuaternionFromMatrix, [Matrix.by_value], Quaternion.by_value],
993
+
994
+ # @!method QuaternionToMatrix(q)
995
+ # QuaternionToMatrix
996
+ # @param q [Quaternion]
997
+ # @return [Matrix]
998
+ [:QuaternionToMatrix, :QuaternionToMatrix, [Quaternion.by_value], Matrix.by_value],
999
+
1000
+ # @!method QuaternionFromAxisAngle(axis, angle)
1001
+ # QuaternionFromAxisAngle
1002
+ # @param axis [Vector3]
1003
+ # @param angle [float]
1004
+ # @return [Quaternion]
1005
+ [:QuaternionFromAxisAngle, :QuaternionFromAxisAngle, [Vector3.by_value, :float], Quaternion.by_value],
1006
+
1007
+ # @!method QuaternionToAxisAngle(q, outAxis, outAngle)
1008
+ # QuaternionToAxisAngle
1009
+ # @param q [Quaternion]
1010
+ # @param outAxis [Vector3 *]
1011
+ # @param outAngle [float *]
1012
+ # @return [void]
1013
+ [:QuaternionToAxisAngle, :QuaternionToAxisAngle, [Quaternion.by_value, :pointer, :pointer], :void],
1014
+
1015
+ # @!method QuaternionFromEuler(pitch, yaw, roll)
1016
+ # QuaternionFromEuler
1017
+ # @param pitch [float]
1018
+ # @param yaw [float]
1019
+ # @param roll [float]
1020
+ # @return [Quaternion]
1021
+ [:QuaternionFromEuler, :QuaternionFromEuler, [:float, :float, :float], Quaternion.by_value],
1022
+
1023
+ # @!method QuaternionToEuler(q)
1024
+ # QuaternionToEuler
1025
+ # @param q [Quaternion]
1026
+ # @return [Vector3]
1027
+ [:QuaternionToEuler, :QuaternionToEuler, [Quaternion.by_value], Vector3.by_value],
1028
+
1029
+ # @!method QuaternionTransform(q, mat)
1030
+ # QuaternionTransform
1031
+ # @param q [Quaternion]
1032
+ # @param mat [Matrix]
1033
+ # @return [Quaternion]
1034
+ [:QuaternionTransform, :QuaternionTransform, [Quaternion.by_value, Matrix.by_value], Quaternion.by_value],
1035
+
1036
+ # @!method QuaternionEquals(p, q)
1037
+ # QuaternionEquals
1038
+ # @param p [Quaternion]
1039
+ # @param q [Quaternion]
1040
+ # @return [int]
1041
+ [:QuaternionEquals, :QuaternionEquals, [Quaternion.by_value, Quaternion.by_value], :int],
1042
+
1043
+ # @!method MatrixDecompose(mat, translation, rotation, scale)
1044
+ # MatrixDecompose
1045
+ # @param mat [Matrix]
1046
+ # @param translation [Vector3 *]
1047
+ # @param rotation [Quaternion *]
1048
+ # @param scale [Vector3 *]
1049
+ # @return [void]
1050
+ [:MatrixDecompose, :MatrixDecompose, [Matrix.by_value, :pointer, :pointer, :pointer], :void],
1051
+ ]
1052
+ entries.each do |entry|
1053
+ api_name = if method_naming == :snake_case
1054
+ snake_case_name = entry[0].to_s.gsub(/([A-Z]+)([A-Z0-9][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z0-9])/, '\1_\2').downcase
1055
+ snake_case_name.gsub!('vector_3', 'vector3_') if snake_case_name.include?('vector_3')
1056
+ snake_case_name.gsub!('vector_2', 'vector2_') if snake_case_name.include?('vector_2')
1057
+ snake_case_name.chop! if snake_case_name.end_with?('_')
1058
+ snake_case_name.to_sym
1059
+ else
1060
+ entry[0]
1061
+ end
1062
+ attach_function api_name, entry[1], entry[2], entry[3]
1063
+ rescue FFI::NotFoundError => e
1064
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
1065
+ end
1066
+ end
1067
+ end