raylib-bindings 0.7.9-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,1067 +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 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
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