@ringozz/godot 4.7.2-583 → 4.7.2-592
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.
- package/README.md +19 -1
- package/gen/classes/ArrayOccluder3D.ts +1 -1
- package/gen/classes/CPUParticles2D.ts +3 -3
- package/gen/classes/CPUParticles3D.ts +3 -3
- package/gen/classes/CSGPolygon3D.ts +1 -1
- package/gen/classes/CollisionPolygon2D.ts +1 -1
- package/gen/classes/CollisionPolygon3D.ts +1 -1
- package/gen/classes/ColorPalette.ts +1 -1
- package/gen/classes/ConcavePolygonShape2D.ts +1 -1
- package/gen/classes/ConcavePolygonShape3D.ts +1 -1
- package/gen/classes/ConvexPolygonShape2D.ts +1 -1
- package/gen/classes/ConvexPolygonShape3D.ts +1 -1
- package/gen/classes/FontVariation.ts +1 -1
- package/gen/classes/Gradient.ts +1 -1
- package/gen/classes/Line2D.ts +1 -1
- package/gen/classes/MultiMesh.ts +4 -4
- package/gen/classes/NavigationMesh.ts +1 -1
- package/gen/classes/NavigationObstacle2D.ts +1 -1
- package/gen/classes/NavigationObstacle3D.ts +1 -1
- package/gen/classes/NavigationPathQueryResult2D.ts +1 -1
- package/gen/classes/NavigationPathQueryResult3D.ts +1 -1
- package/gen/classes/NavigationPolygon.ts +1 -1
- package/gen/classes/OccluderPolygon2D.ts +1 -1
- package/gen/classes/Polygon2D.ts +3 -3
- package/gen/classes/PolygonOccluder3D.ts +1 -1
- package/gen/classes/Window.ts +1 -1
- package/gen/index.ts +0 -3
- package/gen/utility-functions.ts +114 -114
- package/gen/value-types/AABB.ts +267 -277
- package/gen/value-types/Basis.ts +313 -264
- package/gen/value-types/Color.ts +398 -268
- package/gen/value-types/Plane.ts +121 -125
- package/gen/value-types/Projection.ts +178 -126
- package/gen/value-types/Quaternion.ts +180 -179
- package/gen/value-types/Rect2.ts +169 -171
- package/gen/value-types/Rect2i.ts +148 -150
- package/gen/value-types/Transform2D.ts +192 -194
- package/gen/value-types/Transform3D.ts +133 -126
- package/gen/value-types/Vector2.ts +370 -354
- package/gen/value-types/Vector2i.ts +192 -191
- package/gen/value-types/Vector3.ts +354 -354
- package/gen/value-types/Vector3i.ts +187 -192
- package/gen/value-types/Vector4.ts +263 -274
- package/gen/value-types/Vector4i.ts +187 -198
- package/gen/value-types/index.ts +16 -16
- package/package.json +20 -4
- package/src/debug.ts +30 -27
- package/src/index.ts +0 -2
- package/src/runtime.ts +16 -7
package/gen/utility-functions.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { Variant, PackedByteArray, PackedInt64Array, RID } from './heap-typ
|
|
|
14
14
|
*
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export function sin(angleRad: number): number { return _C(
|
|
17
|
+
export function sin(angleRad: number): number { return _C(0n, 13606, angleRad) as number; }
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Returns the cosine of angle `angleRad` in radians.
|
|
@@ -27,7 +27,7 @@ export function sin(angleRad: number): number { return _C(0x18617f8e90b3n, 13606
|
|
|
27
27
|
*
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export function cos(angleRad: number): number { return _C(
|
|
30
|
+
export function cos(angleRad: number): number { return _C(0n, 2500, angleRad) as number; }
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Returns the tangent of angle `angleRad` in radians.
|
|
@@ -38,7 +38,7 @@ export function cos(angleRad: number): number { return _C(0x18617f8e90b3n, 2500,
|
|
|
38
38
|
*
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export function tan(angleRad: number): number { return _C(
|
|
41
|
+
export function tan(angleRad: number): number { return _C(0n, 14117, angleRad) as number; }
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Returns the hyperbolic sine of `x`.
|
|
@@ -50,7 +50,7 @@ export function tan(angleRad: number): number { return _C(0x18617f8e90b3n, 14117
|
|
|
50
50
|
*
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export function sinh(x: number): number { return _C(
|
|
53
|
+
export function sinh(x: number): number { return _C(0n, 13607, x) as number; }
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Returns the hyperbolic cosine of `x` in radians.
|
|
@@ -61,7 +61,7 @@ export function sinh(x: number): number { return _C(0x18617f8e90b3n, 13607, x) a
|
|
|
61
61
|
*
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
export function cosh(x: number): number { return _C(
|
|
64
|
+
export function cosh(x: number): number { return _C(0n, 2501, x) as number; }
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Returns the hyperbolic tangent of `x`.
|
|
@@ -73,7 +73,7 @@ export function cosh(x: number): number { return _C(0x18617f8e90b3n, 2501, x) as
|
|
|
73
73
|
*
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
export function tanh(x: number): number { return _C(
|
|
76
|
+
export function tanh(x: number): number { return _C(0n, 14122, x) as number; }
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Returns the arc sine of `x` in radians. Use to get the angle of sine `x`. `x` will be clamped between `-1.0` and `1.0` (inclusive), in order to prevent {@link asin} from returning `NAN`.
|
|
@@ -85,7 +85,7 @@ export function tanh(x: number): number { return _C(0x18617f8e90b3n, 14122, x) a
|
|
|
85
85
|
*
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
|
-
export function asin(x: number): number { return _C(
|
|
88
|
+
export function asin(x: number): number { return _C(0n, 1600, x) as number; }
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Returns the arc cosine of `x` in radians. Use to get the angle of cosine `x`. `x` will be clamped between `-1.0` and `1.0` (inclusive), in order to prevent {@link acos} from returning `NAN`.
|
|
@@ -97,7 +97,7 @@ export function asin(x: number): number { return _C(0x18617f8e90b3n, 1600, x) as
|
|
|
97
97
|
*
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export function acos(x: number): number { return _C(
|
|
100
|
+
export function acos(x: number): number { return _C(0n, 1152, x) as number; }
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Returns the arc tangent of `x` in radians. Use it to get the angle from an angle's tangent in trigonometry.
|
|
@@ -111,7 +111,7 @@ export function acos(x: number): number { return _C(0x18617f8e90b3n, 1152, x) as
|
|
|
111
111
|
*
|
|
112
112
|
* If `x` is between `-PI / 2` and `PI / 2` (inclusive), `atan(tan(x))` is equal to `x`.
|
|
113
113
|
*/
|
|
114
|
-
export function atan(x: number): number { return _C(
|
|
114
|
+
export function atan(x: number): number { return _C(0n, 1606, x) as number; }
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Returns the arc tangent of `y/x` in radians. Use to get the angle of tangent `y/x`. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
|
|
@@ -123,7 +123,7 @@ export function atan(x: number): number { return _C(0x18617f8e90b3n, 1606, x) as
|
|
|
123
123
|
*
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
126
|
-
export function atan2(y: number, x: number): number { return _C(
|
|
126
|
+
export function atan2(y: number, x: number): number { return _C(0n, 1607, y, x) as number; }
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Returns the hyperbolic arc (also called inverse) sine of `x`, returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space.
|
|
@@ -135,7 +135,7 @@ export function atan2(y: number, x: number): number { return _C(0x61862058054can
|
|
|
135
135
|
*
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
|
-
export function asinh(x: number): number { return _C(
|
|
138
|
+
export function asinh(x: number): number { return _C(0n, 1601, x) as number; }
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Returns the hyperbolic arc (also called inverse) cosine of `x`, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if `x` is larger or equal to 1. For values of `x` lower than 1, it will return 0, in order to prevent {@link acosh} from returning `NAN`.
|
|
@@ -149,7 +149,7 @@ export function asinh(x: number): number { return _C(0x18617f8e90b3n, 1601, x) a
|
|
|
149
149
|
*
|
|
150
150
|
* ```
|
|
151
151
|
*/
|
|
152
|
-
export function acosh(x: number): number { return _C(
|
|
152
|
+
export function acosh(x: number): number { return _C(0n, 1153, x) as number; }
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Returns the hyperbolic arc (also called inverse) tangent of `x`, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if `x` is between -1 and 1 (non-inclusive).
|
|
@@ -165,7 +165,7 @@ export function acosh(x: number): number { return _C(0x18617f8e90b3n, 1153, x) a
|
|
|
165
165
|
*
|
|
166
166
|
* ```
|
|
167
167
|
*/
|
|
168
|
-
export function atanh(x: number): number { return _C(
|
|
168
|
+
export function atanh(x: number): number { return _C(0n, 1608, x) as number; }
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
171
|
* Returns the square root of `x`, where `x` is a non-negative number.
|
|
@@ -180,7 +180,7 @@ export function atanh(x: number): number { return _C(0x18617f8e90b3n, 1608, x) a
|
|
|
180
180
|
*
|
|
181
181
|
* **Note:** Negative values of `x` return NaN ("Not a Number"). In C#, if you need negative inputs, use `System.Numerics.Complex`.
|
|
182
182
|
*/
|
|
183
|
-
export function sqrt(x: number): number { return _C(
|
|
183
|
+
export function sqrt(x: number): number { return _C(0n, 13799, x) as number; }
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Returns the floating-point remainder of `x` divided by `y`, keeping the sign of `x`.
|
|
@@ -193,7 +193,7 @@ export function sqrt(x: number): number { return _C(0x18617f8e90b3n, 13799, x) a
|
|
|
193
193
|
*
|
|
194
194
|
* For the integer remainder operation, use the `%` operator.
|
|
195
195
|
*/
|
|
196
|
-
export function fmod(x: number, y: number): number { return _C(
|
|
196
|
+
export function fmod(x: number, y: number): number { return _C(0n, 3345, x, y) as number; }
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
199
|
* Returns the floating-point modulus of `x` divided by `y`, wrapping equally in positive and negative.
|
|
@@ -222,7 +222,7 @@ export function fmod(x: number, y: number): number { return _C(0x61862058054can,
|
|
|
222
222
|
*
|
|
223
223
|
* ```
|
|
224
224
|
*/
|
|
225
|
-
export function fposmod(x: number, y: number): number { return _C(
|
|
225
|
+
export function fposmod(x: number, y: number): number { return _C(0n, 3555, x, y) as number; }
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Returns the integer modulus of `x` divided by `y` that wraps equally in positive and negative.
|
|
@@ -250,7 +250,7 @@ export function fposmod(x: number, y: number): number { return _C(0x61862058054c
|
|
|
250
250
|
*
|
|
251
251
|
* ```
|
|
252
252
|
*/
|
|
253
|
-
export function posmod(x: number, y: number): number { return _C(
|
|
253
|
+
export function posmod(x: number, y: number): number { return _C(0n, 9518, x, y) as number; }
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* Rounds `x` downward (towards negative infinity), returning the largest whole number that is not more than `x`. Supported types: {@link int}, {@link float}, {@link Vector2}, {@link Vector2i}, {@link Vector3}, {@link Vector3i}, {@link Vector4}, {@link Vector4i}.
|
|
@@ -265,20 +265,20 @@ export function posmod(x: number, y: number): number { return _C(0x41042bac4b5fa
|
|
|
265
265
|
* See also {@link ceil}, {@link round}, and {@link snapped}.
|
|
266
266
|
* **Note:** For better type safety, use {@link floorf}, {@link floori}, {@link Vector2.floor}, {@link Vector3.floor}, or {@link Vector4.floor}.
|
|
267
267
|
*/
|
|
268
|
-
export function floor(x: Variant): Variant { return _C(
|
|
268
|
+
export function floor(x: Variant): Variant { return _C(0n, 3335, x) as Variant; }
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* Rounds `x` downward (towards negative infinity), returning the largest whole number that is not more than `x`.
|
|
272
272
|
* A type-safe version of {@link floor}, returning a {@link float}.
|
|
273
273
|
*/
|
|
274
|
-
export function floorf(x: number): number { return _C(
|
|
274
|
+
export function floorf(x: number): number { return _C(0n, 3341, x) as number; }
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
277
|
* Rounds `x` downward (towards negative infinity), returning the largest whole number that is not more than `x`.
|
|
278
278
|
* A type-safe version of {@link floor}, returning an {@link int}.
|
|
279
279
|
* **Note:** This function is *not* the same as `int(x)`, which rounds towards 0.
|
|
280
280
|
*/
|
|
281
|
-
export function floori(x: number): number { return _C(
|
|
281
|
+
export function floori(x: number): number { return _C(0n, 3342, x) as number; }
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
284
|
* Rounds `x` upward (towards positive infinity), returning the smallest whole number that is not less than `x`. Supported types: {@link int}, {@link float}, {@link Vector2}, {@link Vector2i}, {@link Vector3}, {@link Vector3i}, {@link Vector4}, {@link Vector4i}.
|
|
@@ -293,19 +293,19 @@ export function floori(x: number): number { return _C(0x1841a5b9ecaan, 3342, x)
|
|
|
293
293
|
* See also {@link floor}, {@link round}, and {@link snapped}.
|
|
294
294
|
* **Note:** For better type safety, use {@link ceilf}, {@link ceili}, {@link Vector2.ceil}, {@link Vector3.ceil}, or {@link Vector4.ceil}.
|
|
295
295
|
*/
|
|
296
|
-
export function ceil(x: Variant): Variant { return _C(
|
|
296
|
+
export function ceil(x: Variant): Variant { return _C(0n, 2156, x) as Variant; }
|
|
297
297
|
|
|
298
298
|
/**
|
|
299
299
|
* Rounds `x` upward (towards positive infinity), returning the smallest whole number that is not less than `x`.
|
|
300
300
|
* A type-safe version of {@link ceil}, returning a {@link float}.
|
|
301
301
|
*/
|
|
302
|
-
export function ceilf(x: number): number { return _C(
|
|
302
|
+
export function ceilf(x: number): number { return _C(0n, 2157, x) as number; }
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Rounds `x` upward (towards positive infinity), returning the smallest whole number that is not less than `x`.
|
|
306
306
|
* A type-safe version of {@link ceil}, returning an {@link int}.
|
|
307
307
|
*/
|
|
308
|
-
export function ceili(x: number): number { return _C(
|
|
308
|
+
export function ceili(x: number): number { return _C(0n, 2158, x) as number; }
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
* Rounds `x` to the nearest whole number, with halfway cases rounded away from 0. Supported types: {@link int}, {@link float}, {@link Vector2}, {@link Vector2i}, {@link Vector3}, {@link Vector3i}, {@link Vector4}, {@link Vector4i}.
|
|
@@ -321,19 +321,19 @@ export function ceili(x: number): number { return _C(0x1841a5b9ecaan, 2158, x) a
|
|
|
321
321
|
* See also {@link floor}, {@link ceil}, and {@link snapped}.
|
|
322
322
|
* **Note:** For better type safety, use {@link roundf}, {@link roundi}, {@link Vector2.round}, {@link Vector3.round}, or {@link Vector4.round}.
|
|
323
323
|
*/
|
|
324
|
-
export function round(x: Variant): Variant { return _C(
|
|
324
|
+
export function round(x: Variant): Variant { return _C(0n, 10166, x) as Variant; }
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
327
|
* Rounds `x` to the nearest whole number, with halfway cases rounded away from 0.
|
|
328
328
|
* A type-safe version of {@link round}, returning a {@link float}.
|
|
329
329
|
*/
|
|
330
|
-
export function roundf(x: number): number { return _C(
|
|
330
|
+
export function roundf(x: number): number { return _C(0n, 10169, x) as number; }
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* Rounds `x` to the nearest whole number, with halfway cases rounded away from 0.
|
|
334
334
|
* A type-safe version of {@link round}, returning an {@link int}.
|
|
335
335
|
*/
|
|
336
|
-
export function roundi(x: number): number { return _C(
|
|
336
|
+
export function roundi(x: number): number { return _C(0n, 10170, x) as number; }
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* Returns the absolute value of a {@link Variant} parameter `x` (i.e. non-negative value). Supported types: {@link int}, {@link float}, {@link Vector2}, {@link Vector2i}, {@link Vector3}, {@link Vector3i}, {@link Vector4}, {@link Vector4i}.
|
|
@@ -362,7 +362,7 @@ export function roundi(x: number): number { return _C(0x1841a5b9ecaan, 10170, x)
|
|
|
362
362
|
*
|
|
363
363
|
* **Note:** For better type safety, use {@link absf}, {@link absi}, {@link Vector2.abs}, {@link Vector2i.abs}, {@link Vector3.abs}, {@link Vector3i.abs}, {@link Vector4.abs}, or {@link Vector4i.abs}.
|
|
364
364
|
*/
|
|
365
|
-
export function abs(x: Variant): Variant { return _C(
|
|
365
|
+
export function abs(x: Variant): Variant { return _C(0n, 1053, x) as Variant; }
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
368
|
* Returns the absolute value of float parameter `x` (i.e. positive value).
|
|
@@ -374,7 +374,7 @@ export function abs(x: Variant): Variant { return _C(0x1ffe10048e204n, 1053, x)
|
|
|
374
374
|
*
|
|
375
375
|
* ```
|
|
376
376
|
*/
|
|
377
|
-
export function absf(x: number): number { return _C(
|
|
377
|
+
export function absf(x: number): number { return _C(0n, 1054, x) as number; }
|
|
378
378
|
|
|
379
379
|
/**
|
|
380
380
|
* Returns the absolute value of int parameter `x` (i.e. positive value).
|
|
@@ -386,7 +386,7 @@ export function absf(x: number): number { return _C(0x18617f8e90b3n, 1054, x) as
|
|
|
386
386
|
*
|
|
387
387
|
* ```
|
|
388
388
|
*/
|
|
389
|
-
export function absi(x: number): number { return _C(
|
|
389
|
+
export function absi(x: number): number { return _C(0n, 1055, x) as number; }
|
|
390
390
|
|
|
391
391
|
/**
|
|
392
392
|
* Returns the same type of {@link Variant} as `x`, with `-1` for negative values, `1` for positive values, and `0` for zeros. For `nan` values it returns 0.
|
|
@@ -405,7 +405,7 @@ export function absi(x: number): number { return _C(0x1041809616d0n, 1055, x) as
|
|
|
405
405
|
*
|
|
406
406
|
* **Note:** For better type safety, use {@link signf}, {@link signi}, {@link Vector2.sign}, {@link Vector2i.sign}, {@link Vector3.sign}, {@link Vector3i.sign}, {@link Vector4.sign}, or {@link Vector4i.sign}.
|
|
407
407
|
*/
|
|
408
|
-
export function sign(x: Variant): Variant { return _C(
|
|
408
|
+
export function sign(x: Variant): Variant { return _C(0n, 13597, x) as Variant; }
|
|
409
409
|
|
|
410
410
|
/**
|
|
411
411
|
* Returns `-1.0` if `x` is negative, `1.0` if `x` is positive, and `0.0` if `x` is zero. For `nan` values of `x` it returns 0.0.
|
|
@@ -419,7 +419,7 @@ export function sign(x: Variant): Variant { return _C(0x1ffe10048e204n, 13597, x
|
|
|
419
419
|
*
|
|
420
420
|
* ```
|
|
421
421
|
*/
|
|
422
|
-
export function signf(x: number): number { return _C(
|
|
422
|
+
export function signf(x: number): number { return _C(0n, 13599, x) as number; }
|
|
423
423
|
|
|
424
424
|
/**
|
|
425
425
|
* Returns `-1` if `x` is negative, `1` if `x` is positive, and `0` if `x` is zero.
|
|
@@ -432,7 +432,7 @@ export function signf(x: number): number { return _C(0x18617f8e90b3n, 13599, x)
|
|
|
432
432
|
*
|
|
433
433
|
* ```
|
|
434
434
|
*/
|
|
435
|
-
export function signi(x: number): number { return _C(
|
|
435
|
+
export function signi(x: number): number { return _C(0n, 13600, x) as number; }
|
|
436
436
|
|
|
437
437
|
/**
|
|
438
438
|
* Returns the multiple of `step` that is the closest to `x`. This can also be used to round a floating-point number to an arbitrary number of decimals.
|
|
@@ -450,7 +450,7 @@ export function signi(x: number): number { return _C(0x1041809616d0n, 13600, x)
|
|
|
450
450
|
* See also {@link ceil}, {@link floor}, and {@link round}.
|
|
451
451
|
* **Note:** For better type safety, use {@link snappedf}, {@link snappedi}, {@link Vector2.snapped}, {@link Vector2i.snapped}, {@link Vector3.snapped}, {@link Vector3i.snapped}, {@link Vector4.snapped}, or {@link Vector4i.snapped}.
|
|
452
452
|
*/
|
|
453
|
-
export function snapped(x: Variant, step: Variant): Variant { return _C(
|
|
453
|
+
export function snapped(x: Variant, step: Variant): Variant { return _C(0n, 13674, x, step) as Variant; }
|
|
454
454
|
|
|
455
455
|
/**
|
|
456
456
|
* Returns the multiple of `step` that is the closest to `x`. This can also be used to round a floating-point number to an arbitrary number of decimals.
|
|
@@ -463,7 +463,7 @@ export function snapped(x: Variant, step: Variant): Variant { return _C(0x7fffe2
|
|
|
463
463
|
*
|
|
464
464
|
* ```
|
|
465
465
|
*/
|
|
466
|
-
export function snappedf(x: number, step: number): number { return _C(
|
|
466
|
+
export function snappedf(x: number, step: number): number { return _C(0n, 13675, x, step) as number; }
|
|
467
467
|
|
|
468
468
|
/**
|
|
469
469
|
* Returns the multiple of `step` that is the closest to `x`.
|
|
@@ -476,7 +476,7 @@ export function snappedf(x: number, step: number): number { return _C(0x61862058
|
|
|
476
476
|
*
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
|
-
export function snappedi(x: number, step: number): number { return _C(
|
|
479
|
+
export function snappedi(x: number, step: number): number { return _C(0n, 13676, x, step) as number; }
|
|
480
480
|
|
|
481
481
|
/**
|
|
482
482
|
* Returns the result of `base` raised to the power of `exp`.
|
|
@@ -489,7 +489,7 @@ export function snappedi(x: number, step: number): number { return _C(0x41842d4d
|
|
|
489
489
|
*
|
|
490
490
|
* ```
|
|
491
491
|
*/
|
|
492
|
-
export function pow(base: number, exp: number): number { return _C(
|
|
492
|
+
export function pow(base: number, exp: number): number { return _C(0n, 9522, base, exp) as number; }
|
|
493
493
|
|
|
494
494
|
/**
|
|
495
495
|
* Returns the [natural logarithm](https://en.wikipedia.org/wiki/Natural_logarithm) of `x` (base [e](https://en.wikipedia.org/wiki/E_(mathematical_constant)), with *e* being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.
|
|
@@ -503,7 +503,7 @@ export function pow(base: number, exp: number): number { return _C(0x61862058054
|
|
|
503
503
|
*
|
|
504
504
|
* **Note:** The logarithm of `0` returns `-inf`, while negative values return `-nan`.
|
|
505
505
|
*/
|
|
506
|
-
export function log(x: number): number { return _C(
|
|
506
|
+
export function log(x: number): number { return _C(0n, 8704, x) as number; }
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
509
|
* The natural exponential function. It raises the mathematical constant *e* to the power of `x` and returns it.
|
|
@@ -516,35 +516,35 @@ export function log(x: number): number { return _C(0x18617f8e90b3n, 8704, x) as
|
|
|
516
516
|
*
|
|
517
517
|
* ```
|
|
518
518
|
*/
|
|
519
|
-
export function exp(x: number): number { return _C(
|
|
519
|
+
export function exp(x: number): number { return _C(0n, 3185, x) as number; }
|
|
520
520
|
|
|
521
521
|
/**
|
|
522
522
|
* Returns `true` if `x` is a NaN ("Not a Number" or invalid) value. This method is needed as `NAN` is not equal to itself, which means `x == NAN` can't be used to check whether a value is a NaN.
|
|
523
523
|
*/
|
|
524
|
-
export function isNan(x: number): boolean { return _C(
|
|
524
|
+
export function isNan(x: number): boolean { return _C(0n, 8125, x) as boolean; }
|
|
525
525
|
|
|
526
526
|
/**
|
|
527
527
|
* Returns `true` if `x` is either positive infinity or negative infinity. See also {@link isFinite} and {@link isNan}.
|
|
528
528
|
*/
|
|
529
|
-
export function isInf(x: number): boolean { return _C(
|
|
529
|
+
export function isInf(x: number): boolean { return _C(0n, 8023, x) as boolean; }
|
|
530
530
|
|
|
531
531
|
/**
|
|
532
532
|
* Returns `true` if `a` and `b` are approximately equal to each other.
|
|
533
533
|
* Here, "approximately equal" means that `a` and `b` are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
|
|
534
534
|
* Infinity values of the same sign are considered equal.
|
|
535
535
|
*/
|
|
536
|
-
export function isEqualApprox(a: number, b: number): boolean { return _C(
|
|
536
|
+
export function isEqualApprox(a: number, b: number): boolean { return _C(0n, 7938, a, b) as boolean; }
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
539
|
* Returns `true` if `x` is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.
|
|
540
540
|
* This function is faster than using {@link isEqualApprox} with one value as zero.
|
|
541
541
|
*/
|
|
542
|
-
export function isZeroApprox(x: number): boolean { return _C(
|
|
542
|
+
export function isZeroApprox(x: number): boolean { return _C(0n, 8459, x) as boolean; }
|
|
543
543
|
|
|
544
544
|
/**
|
|
545
545
|
* Returns whether `x` is a finite value, i.e. it is not `NAN`, positive infinity, or negative infinity. See also {@link isInf} and {@link isNan}.
|
|
546
546
|
*/
|
|
547
|
-
export function isFinite(x: number): boolean { return _C(
|
|
547
|
+
export function isFinite(x: number): boolean { return _C(0n, 7951, x) as boolean; }
|
|
548
548
|
|
|
549
549
|
/**
|
|
550
550
|
* Returns an "eased" value of `x` based on an easing function defined with `curve`. This easing function is based on an exponent. The `curve` can be any floating-point number, with specific values leading to the following behaviors:
|
|
@@ -564,7 +564,7 @@ export function isFinite(x: number): boolean { return _C(0x1821d4bde6edn, 7951,
|
|
|
564
564
|
* [ease() curve values cheatsheet](https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png)
|
|
565
565
|
* See also {@link smoothstep}. If you need to perform more advanced transitions, use {@link Tween.interpolateValue}.
|
|
566
566
|
*/
|
|
567
|
-
export function ease(x: number, curve: number): number { return _C(
|
|
567
|
+
export function ease(x: number, curve: number): number { return _C(0n, 2988, x, curve) as number; }
|
|
568
568
|
|
|
569
569
|
/**
|
|
570
570
|
* Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
|
|
@@ -577,7 +577,7 @@ export function ease(x: number, curve: number): number { return _C(0x61862058054
|
|
|
577
577
|
*
|
|
578
578
|
* ```
|
|
579
579
|
*/
|
|
580
|
-
export function stepDecimals(x: number): number { return _C(
|
|
580
|
+
export function stepDecimals(x: number): number { return _C(0n, 13862, x) as number; }
|
|
581
581
|
|
|
582
582
|
/**
|
|
583
583
|
* Linearly interpolates between two values by the factor defined in `weight`. To perform interpolation, `weight` should be between `0.0` and `1.0` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use {@link clampf} to limit `weight`.
|
|
@@ -592,7 +592,7 @@ export function stepDecimals(x: number): number { return _C(0x1841a5b9ecaan, 138
|
|
|
592
592
|
* See also {@link inverseLerp} which performs the reverse of this operation. To perform eased interpolation with {@link lerp}, combine it with {@link ease} or {@link smoothstep}. See also {@link remap} to map a continuous series of values to another.
|
|
593
593
|
* **Note:** For better type safety, use {@link lerpf}, {@link Vector2.lerp}, {@link Vector3.lerp}, {@link Vector4.lerp}, {@link Color.lerp}, {@link Quaternion.slerp}, {@link Basis.slerp}, {@link Transform2D.interpolateWith}, or {@link Transform3D.interpolateWith}.
|
|
594
594
|
*/
|
|
595
|
-
export function lerp(from: Variant, to: Variant, weight: Variant): Variant { return _C(
|
|
595
|
+
export function lerp(from: Variant, to: Variant, weight: Variant): Variant { return _C(0n, 8548, from, to, weight) as Variant; }
|
|
596
596
|
|
|
597
597
|
/**
|
|
598
598
|
* Linearly interpolates between two values by the factor defined in `weight`. To perform interpolation, `weight` should be between `0.0` and `1.0` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use {@link clampf} on the result of this function.
|
|
@@ -605,44 +605,44 @@ export function lerp(from: Variant, to: Variant, weight: Variant): Variant { ret
|
|
|
605
605
|
*
|
|
606
606
|
* See also {@link inverseLerp} which performs the reverse of this operation. To perform eased interpolation with {@link lerp}, combine it with {@link ease} or {@link smoothstep}.
|
|
607
607
|
*/
|
|
608
|
-
export function lerpf(from: number, to: number, weight: number): number { return _C(
|
|
608
|
+
export function lerpf(from: number, to: number, weight: number): number { return _C(0n, 8550, from, to, weight) as number; }
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
611
|
* Cubic interpolates between two values by the factor defined in `weight` with `pre` and `post` values.
|
|
612
612
|
*/
|
|
613
|
-
export function cubicInterpolate(from: number, to: number, pre: number, post: number, weight: number): number { return _C(
|
|
613
|
+
export function cubicInterpolate(from: number, to: number, pre: number, post: number, weight: number): number { return _C(0n, 2590, from, to, pre, post, weight) as number; }
|
|
614
614
|
|
|
615
615
|
/**
|
|
616
616
|
* Cubic interpolates between two rotation values with shortest path by the factor defined in `weight` with `pre` and `post` values. See also {@link lerpAngle}.
|
|
617
617
|
*/
|
|
618
|
-
export function cubicInterpolateAngle(from: number, to: number, pre: number, post: number, weight: number): number { return _C(
|
|
618
|
+
export function cubicInterpolateAngle(from: number, to: number, pre: number, post: number, weight: number): number { return _C(0n, 2591, from, to, pre, post, weight) as number; }
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
621
|
* Cubic interpolates between two values by the factor defined in `weight` with `pre` and `post` values.
|
|
622
622
|
* It can perform smoother interpolation than {@link cubicInterpolate} by the time values.
|
|
623
623
|
*/
|
|
624
|
-
export function cubicInterpolateInTime(from: number, to: number, pre: number, post: number, weight: number, toT: number, preT: number, postT: number): number { return _C(
|
|
624
|
+
export function cubicInterpolateInTime(from: number, to: number, pre: number, post: number, weight: number, toT: number, preT: number, postT: number): number { return _C(0n, 2593, from, to, pre, post, weight, toT, preT, postT) as number; }
|
|
625
625
|
|
|
626
626
|
/**
|
|
627
627
|
* Cubic interpolates between two rotation values with shortest path by the factor defined in `weight` with `pre` and `post` values. See also {@link lerpAngle}.
|
|
628
628
|
* It can perform smoother interpolation than {@link cubicInterpolate} by the time values.
|
|
629
629
|
*/
|
|
630
|
-
export function cubicInterpolateAngleInTime(from: number, to: number, pre: number, post: number, weight: number, toT: number, preT: number, postT: number): number { return _C(
|
|
630
|
+
export function cubicInterpolateAngleInTime(from: number, to: number, pre: number, post: number, weight: number, toT: number, preT: number, postT: number): number { return _C(0n, 2592, from, to, pre, post, weight, toT, preT, postT) as number; }
|
|
631
631
|
|
|
632
632
|
/**
|
|
633
633
|
* Returns the point at the given `t` on a one-dimensional [Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve) defined by the given `control1`, `control2`, and `end` points.
|
|
634
634
|
*/
|
|
635
|
-
export function bezierInterpolate(start: number, control1: number, control2: number, end: number, t: number): number { return _C(
|
|
635
|
+
export function bezierInterpolate(start: number, control1: number, control2: number, end: number, t: number): number { return _C(0n, 1757, start, control1, control2, end, t) as number; }
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
638
|
* Returns the derivative at the given `t` on a one-dimensional [Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve) defined by the given `control1`, `control2`, and `end` points.
|
|
639
639
|
*/
|
|
640
|
-
export function bezierDerivative(start: number, control1: number, control2: number, end: number, t: number): number { return _C(
|
|
640
|
+
export function bezierDerivative(start: number, control1: number, control2: number, end: number, t: number): number { return _C(0n, 1756, start, control1, control2, end, t) as number; }
|
|
641
641
|
|
|
642
642
|
/**
|
|
643
643
|
* Returns the difference between the two angles (in radians), in the range of `[-PI, +PI]`. When `from` and `to` are opposite, returns `-PI` if `from` is smaller than `to`, or `PI` otherwise.
|
|
644
644
|
*/
|
|
645
|
-
export function angleDifference(from: number, to: number): number { return _C(
|
|
645
|
+
export function angleDifference(from: number, to: number): number { return _C(0n, 1450, from, to) as number; }
|
|
646
646
|
|
|
647
647
|
/**
|
|
648
648
|
* Linearly interpolates between two angles (in radians) by a `weight` value between 0.0 and 1.0.
|
|
@@ -662,7 +662,7 @@ export function angleDifference(from: number, to: number): number { return _C(0x
|
|
|
662
662
|
*
|
|
663
663
|
* **Note:** This function lerps through the shortest path between `from` and `to`. However, when these two angles are approximately `PI + k * TAU` apart for any integer `k`, it's not obvious which way they lerp due to floating-point precision errors. For example, `lerp_angle(0, PI, weight)` lerps counter-clockwise, while `lerp_angle(0, PI + 5 * TAU, weight)` lerps clockwise.
|
|
664
664
|
*/
|
|
665
|
-
export function lerpAngle(from: number, to: number, weight: number): number { return _C(
|
|
665
|
+
export function lerpAngle(from: number, to: number, weight: number): number { return _C(0n, 8549, from, to, weight) as number; }
|
|
666
666
|
|
|
667
667
|
/**
|
|
668
668
|
* Returns an interpolation or extrapolation factor considering the range specified in `from` and `to`, and the interpolated value specified in `weight`. The returned value will be between `0.0` and `1.0` if `weight` is between `from` and `to` (inclusive). If `weight` is located outside this range, then an extrapolation factor will be returned (return value lower than `0.0` or greater than `1.0`). Use {@link clamp} on the result of {@link inverseLerp} if this is not desired.
|
|
@@ -681,7 +681,7 @@ export function lerpAngle(from: number, to: number, weight: number): number { re
|
|
|
681
681
|
*
|
|
682
682
|
* See also {@link lerp}, which performs the reverse of this operation, and {@link remap} to map a continuous series of values to another.
|
|
683
683
|
*/
|
|
684
|
-
export function inverseLerp(from: number, to: number, weight: number): number { return _C(
|
|
684
|
+
export function inverseLerp(from: number, to: number, weight: number): number { return _C(0n, 7718, from, to, weight) as number; }
|
|
685
685
|
|
|
686
686
|
/**
|
|
687
687
|
* Maps a `value` from range `[istart, istop]` to `[ostart, ostop]`. See also {@link lerp} and {@link inverseLerp}. If `value` is outside `[istart, istop]`, then the resulting value will also be outside `[ostart, ostop]`. If this is not desired, use {@link clamp} on the result of this function.
|
|
@@ -695,7 +695,7 @@ export function inverseLerp(from: number, to: number, weight: number): number {
|
|
|
695
695
|
* For complex use cases where multiple ranges are needed, consider using {@link Curve} or {@link Gradient} instead.
|
|
696
696
|
* **Note:** If `istart == istop`, the return value is undefined (most likely NaN, INF, or -INF).
|
|
697
697
|
*/
|
|
698
|
-
export function remap(value: number, istart: number, istop: number, ostart: number, ostop: number): number { return _C(
|
|
698
|
+
export function remap(value: number, istart: number, istop: number, ostart: number, ostop: number): number { return _C(0n, 9875, value, istart, istop, ostart, ostop) as number; }
|
|
699
699
|
|
|
700
700
|
/**
|
|
701
701
|
* Returns a smooth cubic Hermite interpolation between `0` and `1`.
|
|
@@ -716,7 +716,7 @@ export function remap(value: number, istart: number, istop: number, ostart: numb
|
|
|
716
716
|
* [Comparison between smoothstep() and ease(x, -1.6521) return values](https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png)
|
|
717
717
|
* [Smoothstep() return values with positive, zero, and negative ranges](https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_range.webp)
|
|
718
718
|
*/
|
|
719
|
-
export function smoothstep(from: number, to: number, x: number): number { return _C(
|
|
719
|
+
export function smoothstep(from: number, to: number, x: number): number { return _C(0n, 13670, from, to, x) as number; }
|
|
720
720
|
|
|
721
721
|
/**
|
|
722
722
|
* Moves `from` toward `to` by the `delta` amount. Will not go past `to`.
|
|
@@ -731,14 +731,14 @@ export function smoothstep(from: number, to: number, x: number): number { return
|
|
|
731
731
|
*
|
|
732
732
|
* ```
|
|
733
733
|
*/
|
|
734
|
-
export function moveToward(from: number, to: number, delta: number): number { return _C(
|
|
734
|
+
export function moveToward(from: number, to: number, delta: number): number { return _C(0n, 9004, from, to, delta) as number; }
|
|
735
735
|
|
|
736
736
|
/**
|
|
737
737
|
* Rotates `from` toward `to` by the `delta` amount. Will not go past `to`.
|
|
738
738
|
* Similar to {@link moveToward}, but interpolates correctly when the angles wrap around `TAU`.
|
|
739
739
|
* If `delta` is negative, this function will rotate away from `to`, toward the opposite angle, and will not go past the opposite angle.
|
|
740
740
|
*/
|
|
741
|
-
export function rotateToward(from: number, to: number, delta: number): number { return _C(
|
|
741
|
+
export function rotateToward(from: number, to: number, delta: number): number { return _C(0n, 10140, from, to, delta) as number; }
|
|
742
742
|
|
|
743
743
|
/**
|
|
744
744
|
* Converts an angle expressed in degrees to radians.
|
|
@@ -749,7 +749,7 @@ export function rotateToward(from: number, to: number, delta: number): number {
|
|
|
749
749
|
*
|
|
750
750
|
* ```
|
|
751
751
|
*/
|
|
752
|
-
export function degToRad(deg: number): number { return _C(
|
|
752
|
+
export function degToRad(deg: number): number { return _C(0n, 2715, deg) as number; }
|
|
753
753
|
|
|
754
754
|
/**
|
|
755
755
|
* Converts an angle expressed in radians to degrees.
|
|
@@ -762,7 +762,7 @@ export function degToRad(deg: number): number { return _C(0x18617f8e90b3n, 2715,
|
|
|
762
762
|
*
|
|
763
763
|
* ```
|
|
764
764
|
*/
|
|
765
|
-
export function radToDeg(rad: number): number { return _C(
|
|
765
|
+
export function radToDeg(rad: number): number { return _C(0n, 9702, rad) as number; }
|
|
766
766
|
|
|
767
767
|
/**
|
|
768
768
|
* Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected.
|
|
@@ -774,12 +774,12 @@ export function radToDeg(rad: number): number { return _C(0x18617f8e90b3n, 9702,
|
|
|
774
774
|
*
|
|
775
775
|
* ```
|
|
776
776
|
*/
|
|
777
|
-
export function linearToDb(lin: number): number { return _C(
|
|
777
|
+
export function linearToDb(lin: number): number { return _C(0n, 8633, lin) as number; }
|
|
778
778
|
|
|
779
779
|
/**
|
|
780
780
|
* Converts from decibels to linear energy (audio).
|
|
781
781
|
*/
|
|
782
|
-
export function dbToLinear(db: number): number { return _C(
|
|
782
|
+
export function dbToLinear(db: number): number { return _C(0n, 2656, db) as number; }
|
|
783
783
|
|
|
784
784
|
/**
|
|
785
785
|
* Wraps the {@link Variant} `value` between `min` and `max`. `min` is *inclusive* while `max` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
|
@@ -798,7 +798,7 @@ export function dbToLinear(db: number): number { return _C(0x18617f8e90b3n, 2656
|
|
|
798
798
|
*
|
|
799
799
|
* ```
|
|
800
800
|
*/
|
|
801
|
-
export function wrap(value: Variant, min: Variant, max: Variant): Variant { return _C(
|
|
801
|
+
export function wrap(value: Variant, min: Variant, max: Variant): Variant { return _C(0n, 14926, value, min, max) as Variant; }
|
|
802
802
|
|
|
803
803
|
/**
|
|
804
804
|
* Wraps the integer `value` between `min` and `max`. `min` is *inclusive* while `max` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
|
@@ -818,7 +818,7 @@ export function wrap(value: Variant, min: Variant, max: Variant): Variant { retu
|
|
|
818
818
|
*
|
|
819
819
|
* ```
|
|
820
820
|
*/
|
|
821
|
-
export function wrapi(value: number, min: number, max: number): number { return _C(
|
|
821
|
+
export function wrapi(value: number, min: number, max: number): number { return _C(0n, 14933, value, min, max) as number; }
|
|
822
822
|
|
|
823
823
|
/**
|
|
824
824
|
* Wraps the float `value` between `min` and `max`. `min` is *inclusive* while `max` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
|
@@ -848,7 +848,7 @@ export function wrapi(value: number, min: number, max: number): number { return
|
|
|
848
848
|
*
|
|
849
849
|
* **Note:** If `min` is `0`, this is equivalent to {@link fposmod}, so prefer using that instead. {@link wrapf} is more flexible than using the {@link fposmod} approach by giving the user control over the minimum value.
|
|
850
850
|
*/
|
|
851
|
-
export function wrapf(value: number, min: number, max: number): number { return _C(
|
|
851
|
+
export function wrapf(value: number, min: number, max: number): number { return _C(0n, 14932, value, min, max) as number; }
|
|
852
852
|
|
|
853
853
|
/**
|
|
854
854
|
* Returns the maximum of the given numeric values. This function can take any number of arguments.
|
|
@@ -861,7 +861,7 @@ export function wrapf(value: number, min: number, max: number): number { return
|
|
|
861
861
|
*
|
|
862
862
|
* **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using `x < y`. To perform component-wise maximum, use {@link Vector2.max}, {@link Vector2i.max}, {@link Vector3.max}, {@link Vector3i.max}, {@link Vector4.max}, and {@link Vector4i.max}.
|
|
863
863
|
*/
|
|
864
|
-
export function max(arg1: Variant, arg2: Variant): Variant { return _C(
|
|
864
|
+
export function max(arg1: Variant, arg2: Variant): Variant { return _C(0n, 8804, arg1, arg2) as Variant; }
|
|
865
865
|
|
|
866
866
|
/**
|
|
867
867
|
* Returns the maximum of two {@link int} values.
|
|
@@ -873,7 +873,7 @@ export function max(arg1: Variant, arg2: Variant): Variant { return _C(0x7fffe2e
|
|
|
873
873
|
*
|
|
874
874
|
* ```
|
|
875
875
|
*/
|
|
876
|
-
export function maxi(a: number, b: number): number { return _C(
|
|
876
|
+
export function maxi(a: number, b: number): number { return _C(0n, 8840, a, b) as number; }
|
|
877
877
|
|
|
878
878
|
/**
|
|
879
879
|
* Returns the maximum of two {@link float} values.
|
|
@@ -885,7 +885,7 @@ export function maxi(a: number, b: number): number { return _C(0x41042bac4b5fan,
|
|
|
885
885
|
*
|
|
886
886
|
* ```
|
|
887
887
|
*/
|
|
888
|
-
export function maxf(a: number, b: number): number { return _C(
|
|
888
|
+
export function maxf(a: number, b: number): number { return _C(0n, 8839, a, b) as number; }
|
|
889
889
|
|
|
890
890
|
/**
|
|
891
891
|
* Returns the minimum of the given numeric values. This function can take any number of arguments.
|
|
@@ -898,7 +898,7 @@ export function maxf(a: number, b: number): number { return _C(0x61862058054can,
|
|
|
898
898
|
*
|
|
899
899
|
* **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using `x < y`. To perform component-wise minimum, use {@link Vector2.min}, {@link Vector2i.min}, {@link Vector3.min}, {@link Vector3i.min}, {@link Vector4.min}, and {@link Vector4i.min}.
|
|
900
900
|
*/
|
|
901
|
-
export function min(arg1: Variant, arg2: Variant): Variant { return _C(
|
|
901
|
+
export function min(arg1: Variant, arg2: Variant): Variant { return _C(0n, 8910, arg1, arg2) as Variant; }
|
|
902
902
|
|
|
903
903
|
/**
|
|
904
904
|
* Returns the minimum of two {@link int} values.
|
|
@@ -910,7 +910,7 @@ export function min(arg1: Variant, arg2: Variant): Variant { return _C(0x7fffe2e
|
|
|
910
910
|
*
|
|
911
911
|
* ```
|
|
912
912
|
*/
|
|
913
|
-
export function mini(a: number, b: number): number { return _C(
|
|
913
|
+
export function mini(a: number, b: number): number { return _C(0n, 8922, a, b) as number; }
|
|
914
914
|
|
|
915
915
|
/**
|
|
916
916
|
* Returns the minimum of two {@link float} values.
|
|
@@ -922,7 +922,7 @@ export function mini(a: number, b: number): number { return _C(0x41042bac4b5fan,
|
|
|
922
922
|
*
|
|
923
923
|
* ```
|
|
924
924
|
*/
|
|
925
|
-
export function minf(a: number, b: number): number { return _C(
|
|
925
|
+
export function minf(a: number, b: number): number { return _C(0n, 8921, a, b) as number; }
|
|
926
926
|
|
|
927
927
|
/**
|
|
928
928
|
* Clamps the `value`, returning a {@link Variant} not less than `min` and not more than `max`. Any values that can be compared with the less than and greater than operators will work.
|
|
@@ -940,7 +940,7 @@ export function minf(a: number, b: number): number { return _C(0x61862058054can,
|
|
|
940
940
|
* **Note:** For better type safety, use {@link clampf}, {@link clampi}, {@link Vector2.clamp}, {@link Vector2i.clamp}, {@link Vector3.clamp}, {@link Vector3i.clamp}, {@link Vector4.clamp}, {@link Vector4i.clamp}, or {@link Color.clamp} (not currently supported by this method).
|
|
941
941
|
* **Note:** When using this on vectors it will *not* perform component-wise clamping, and will pick `min` if `value < min` or `max` if `value > max`. To perform component-wise clamping use the methods listed above.
|
|
942
942
|
*/
|
|
943
|
-
export function clamp(value: Variant, min: Variant, max: Variant): Variant { return _C(
|
|
943
|
+
export function clamp(value: Variant, min: Variant, max: Variant): Variant { return _C(0n, 2202, value, min, max) as Variant; }
|
|
944
944
|
|
|
945
945
|
/**
|
|
946
946
|
* Clamps the `value`, returning an {@link int} not less than `min` and not more than `max`.
|
|
@@ -955,7 +955,7 @@ export function clamp(value: Variant, min: Variant, max: Variant): Variant { ret
|
|
|
955
955
|
*
|
|
956
956
|
* ```
|
|
957
957
|
*/
|
|
958
|
-
export function clampi(value: number, min: number, max: number): number { return _C(
|
|
958
|
+
export function clampi(value: number, min: number, max: number): number { return _C(0n, 2206, value, min, max) as number; }
|
|
959
959
|
|
|
960
960
|
/**
|
|
961
961
|
* Clamps the `value`, returning a {@link float} not less than `min` and not more than `max`.
|
|
@@ -970,7 +970,7 @@ export function clampi(value: number, min: number, max: number): number { return
|
|
|
970
970
|
*
|
|
971
971
|
* ```
|
|
972
972
|
*/
|
|
973
|
-
export function clampf(value: number, min: number, max: number): number { return _C(
|
|
973
|
+
export function clampf(value: number, min: number, max: number): number { return _C(0n, 2205, value, min, max) as number; }
|
|
974
974
|
|
|
975
975
|
/**
|
|
976
976
|
* Returns the smallest integer power of 2 that is greater than or equal to `value`.
|
|
@@ -988,7 +988,7 @@ export function clampf(value: number, min: number, max: number): number { return
|
|
|
988
988
|
*
|
|
989
989
|
* **Warning:** Due to its implementation, this method returns `0` rather than `1` for values less than or equal to `0`, with an exception for `value` being the smallest negative 64-bit integer (`-9223372036854775808`) in which case the `value` is returned unchanged.
|
|
990
990
|
*/
|
|
991
|
-
export function nearestPo2(value: number): number { return _C(
|
|
991
|
+
export function nearestPo2(value: number): number { return _C(0n, 9062, value) as number; }
|
|
992
992
|
|
|
993
993
|
/**
|
|
994
994
|
* Wraps `value` between `0` and the `length`. If the limit is reached, the next value the function returns is decreased to the `0` side or increased to the `length` side (like a triangle wave). If `length` is less than zero, it becomes positive.
|
|
@@ -1008,13 +1008,13 @@ export function nearestPo2(value: number): number { return _C(0x1041809616d0n, 9
|
|
|
1008
1008
|
*
|
|
1009
1009
|
* ```
|
|
1010
1010
|
*/
|
|
1011
|
-
export function pingpong(value: number, length: number): number { return _C(
|
|
1011
|
+
export function pingpong(value: number, length: number): number { return _C(0n, 9430, value, length) as number; }
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
|
|
1015
1015
|
* **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use {@link seed} to initialize the random number generator.
|
|
1016
1016
|
*/
|
|
1017
|
-
export function randomize(): void { _C(
|
|
1017
|
+
export function randomize(): void { _C(0n, 9729); }
|
|
1018
1018
|
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval `[0, N - 1]` (where N is smaller than 2^32).
|
|
@@ -1029,7 +1029,7 @@ export function randomize(): void { _C(0x64d59d5cn, 9729); }
|
|
|
1029
1029
|
*
|
|
1030
1030
|
* ```
|
|
1031
1031
|
*/
|
|
1032
|
-
export function randi(): number { return _C(
|
|
1032
|
+
export function randi(): number { return _C(0n, 9724) as number; }
|
|
1033
1033
|
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Returns a random floating-point value between `0.0` and `1.0` (inclusive).
|
|
@@ -1041,7 +1041,7 @@ export function randi(): number { return _C(0x4029cb80d8n, 9724) as number; }
|
|
|
1041
1041
|
*
|
|
1042
1042
|
* ```
|
|
1043
1043
|
*/
|
|
1044
|
-
export function randf(): number { return _C(
|
|
1044
|
+
export function randf(): number { return _C(0n, 9721) as number; }
|
|
1045
1045
|
|
|
1046
1046
|
/**
|
|
1047
1047
|
* Returns a random signed 32-bit integer between `from` and `to` (inclusive). If `to` is lesser than `from`, they are swapped.
|
|
@@ -1054,7 +1054,7 @@ export function randf(): number { return _C(0x607c594f85n, 9721) as number; }
|
|
|
1054
1054
|
*
|
|
1055
1055
|
* ```
|
|
1056
1056
|
*/
|
|
1057
|
-
export function randiRange(from: number, to: number): number { return _C(
|
|
1057
|
+
export function randiRange(from: number, to: number): number { return _C(0n, 9725, from, to) as number; }
|
|
1058
1058
|
|
|
1059
1059
|
/**
|
|
1060
1060
|
* Returns a random floating-point value between `from` and `to` (inclusive).
|
|
@@ -1067,13 +1067,13 @@ export function randiRange(from: number, to: number): number { return _C(0x41042
|
|
|
1067
1067
|
*
|
|
1068
1068
|
* ```
|
|
1069
1069
|
*/
|
|
1070
|
-
export function randfRange(from: number, to: number): number { return _C(
|
|
1070
|
+
export function randfRange(from: number, to: number): number { return _C(0n, 9722, from, to) as number; }
|
|
1071
1071
|
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Returns a [normally-distributed](https://en.wikipedia.org/wiki/Normal_distribution), pseudo-random floating-point value from the specified `mean` and a standard `deviation`. This is also known as a Gaussian distribution.
|
|
1074
1074
|
* **Note:** This method uses the [Box-Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform) algorithm.
|
|
1075
1075
|
*/
|
|
1076
|
-
export function randfn(mean: number, deviation: number): number { return _C(
|
|
1076
|
+
export function randfn(mean: number, deviation: number): number { return _C(0n, 9723, mean, deviation) as number; }
|
|
1077
1077
|
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Sets the seed for the random number generator to `base`. Setting the seed manually can ensure consistent, repeatable results for most random functions.
|
|
@@ -1090,7 +1090,7 @@ export function randfn(mean: number, deviation: number): number { return _C(0x61
|
|
|
1090
1090
|
*
|
|
1091
1091
|
* ```
|
|
1092
1092
|
*/
|
|
1093
|
-
export function seed(base: number): void { _C(
|
|
1093
|
+
export function seed(base: number): void { _C(0n, 10342, base); }
|
|
1094
1094
|
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Given a `seed`, returns a {@link PackedInt64Array} of size `2`, where its first element is the randomized {@link int} value, and the second element is the same as `seed`. Passing the same `seed` consistently returns the same array.
|
|
@@ -1105,13 +1105,13 @@ export function seed(base: number): void { _C(0x100116d310e5n, 10342, base); }
|
|
|
1105
1105
|
*
|
|
1106
1106
|
* ```
|
|
1107
1107
|
*/
|
|
1108
|
-
export function randFromSeed(seed: number): PackedInt64Array { return _C(
|
|
1108
|
+
export function randFromSeed(seed: number): PackedInt64Array { return _C(0n, 9719, seed) as PackedInt64Array; }
|
|
1109
1109
|
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Returns a {@link WeakRef} instance holding a weak reference to `obj`. Returns an empty {@link WeakRef} instance if `obj` is `null`. Prints an error and returns `null` if `obj` is neither {@link Object}-derived nor `null`.
|
|
1112
1112
|
* A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
|
|
1113
1113
|
*/
|
|
1114
|
-
export function weakref(obj: Variant): Variant { return _C(
|
|
1114
|
+
export function weakref(obj: Variant): Variant { return _C(0n, 14843, obj) as Variant; }
|
|
1115
1115
|
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Returns the internal type of the given `variable`, using the {@link Variant.Type} values.
|
|
@@ -1130,7 +1130,7 @@ export function weakref(obj: Variant): Variant { return _C(0x1ffe10048e204n, 148
|
|
|
1130
1130
|
*
|
|
1131
1131
|
* See also {@link typeString}.
|
|
1132
1132
|
*/
|
|
1133
|
-
export function _typeof(variable: Variant): number { return _C(
|
|
1133
|
+
export function _typeof(variable: Variant): number { return _C(0n, 14457, variable) as number; }
|
|
1134
1134
|
|
|
1135
1135
|
/**
|
|
1136
1136
|
* Converts the given `variant` to the given `type`, using the {@link Variant.Type} values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric {@link String}s to {@link int}, and converting most things to {@link String}.
|
|
@@ -1147,7 +1147,7 @@ export function _typeof(variable: Variant): number { return _C(0x1f8411374d042n,
|
|
|
1147
1147
|
*
|
|
1148
1148
|
* ```
|
|
1149
1149
|
*/
|
|
1150
|
-
export function typeConvert(variant: Variant, type: number): Variant { return _C(
|
|
1150
|
+
export function typeConvert(variant: Variant, type: number): Variant { return _C(0n, 14454, variant, type) as Variant; }
|
|
1151
1151
|
|
|
1152
1152
|
/**
|
|
1153
1153
|
* Converts one or more arguments of any {@link Variant} type to a {@link String} in the best way possible.
|
|
@@ -1161,7 +1161,7 @@ export function typeConvert(variant: Variant, type: number): Variant { return _C
|
|
|
1161
1161
|
*
|
|
1162
1162
|
* ```
|
|
1163
1163
|
*/
|
|
1164
|
-
export function str(arg1: Variant): string { return _C(
|
|
1164
|
+
export function str(arg1: Variant): string { return _C(0n, 13887, arg1) as string; }
|
|
1165
1165
|
|
|
1166
1166
|
/**
|
|
1167
1167
|
* Returns a human-readable name for the given {@link Error} code.
|
|
@@ -1175,7 +1175,7 @@ export function str(arg1: Variant): string { return _C(0x1f88101f0f758n, 13887,
|
|
|
1175
1175
|
*
|
|
1176
1176
|
* ```
|
|
1177
1177
|
*/
|
|
1178
|
-
export function errorString(error: number): string { return _C(
|
|
1178
|
+
export function errorString(error: number): string { return _C(0n, 3166, error) as string; }
|
|
1179
1179
|
|
|
1180
1180
|
/**
|
|
1181
1181
|
* Returns a human-readable name of the given `type`, using the {@link Variant.Type} values.
|
|
@@ -1190,7 +1190,7 @@ export function errorString(error: number): string { return _C(0x108138309612n,
|
|
|
1190
1190
|
*
|
|
1191
1191
|
* See also {@link typeof}.
|
|
1192
1192
|
*/
|
|
1193
|
-
export function typeString(type: number): string { return _C(
|
|
1193
|
+
export function typeString(type: number): string { return _C(0n, 14456, type) as string; }
|
|
1194
1194
|
|
|
1195
1195
|
/**
|
|
1196
1196
|
* Converts one or more arguments of any type to string in the best way possible and prints them to the console.
|
|
@@ -1207,7 +1207,7 @@ export function typeString(type: number): string { return _C(0x108138309612n, 14
|
|
|
1207
1207
|
*
|
|
1208
1208
|
* **Note:** Consider using {@link pushError} and {@link pushWarning} to print error and warning messages instead of {@link print} or {@link printRich}. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also {@link Engine.printToStdout} and {@link ProjectSettings.application/run/disableStdout}.
|
|
1209
1209
|
*/
|
|
1210
|
-
export function print(arg1: Variant): void { _C(
|
|
1210
|
+
export function print(arg1: Variant): void { _C(0n, 9554, arg1); }
|
|
1211
1211
|
|
|
1212
1212
|
/**
|
|
1213
1213
|
* Converts one or more arguments of any type to string in the best way possible and prints them to the console.
|
|
@@ -1225,7 +1225,7 @@ export function print(arg1: Variant): void { _C(0x1f8019de0016en, 9554, arg1); }
|
|
|
1225
1225
|
* **Note:** Consider using {@link pushError} and {@link pushWarning} to print error and warning messages instead of {@link print} or {@link printRich}. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
|
|
1226
1226
|
* **Note:** Output displayed in the editor supports clickable {@link code skip-lint}[text](address) tags. The {@link code skip-lint}[]() tag's `address` value is handled by {@link OS.shellOpen} when clicked.
|
|
1227
1227
|
*/
|
|
1228
|
-
export function printRich(arg1: Variant): void { _C(
|
|
1228
|
+
export function printRich(arg1: Variant): void { _C(0n, 9557, arg1); }
|
|
1229
1229
|
|
|
1230
1230
|
/**
|
|
1231
1231
|
* Prints one or more arguments to strings in the best way possible to standard error line.
|
|
@@ -1237,7 +1237,7 @@ export function printRich(arg1: Variant): void { _C(0x1f8019de0016en, 9557, arg1
|
|
|
1237
1237
|
*
|
|
1238
1238
|
* ```
|
|
1239
1239
|
*/
|
|
1240
|
-
export function printerr(arg1: Variant): void { _C(
|
|
1240
|
+
export function printerr(arg1: Variant): void { _C(0n, 9562, arg1); }
|
|
1241
1241
|
|
|
1242
1242
|
/**
|
|
1243
1243
|
* Prints one or more arguments to the console with a tab between each argument.
|
|
@@ -1249,7 +1249,7 @@ export function printerr(arg1: Variant): void { _C(0x1f8019de0016en, 9562, arg1)
|
|
|
1249
1249
|
*
|
|
1250
1250
|
* ```
|
|
1251
1251
|
*/
|
|
1252
|
-
export function printt(arg1: Variant): void { _C(
|
|
1252
|
+
export function printt(arg1: Variant): void { _C(0n, 9565, arg1); }
|
|
1253
1253
|
|
|
1254
1254
|
/**
|
|
1255
1255
|
* Prints one or more arguments to the console with a space between each argument.
|
|
@@ -1261,7 +1261,7 @@ export function printt(arg1: Variant): void { _C(0x1f8019de0016en, 9565, arg1);
|
|
|
1261
1261
|
*
|
|
1262
1262
|
* ```
|
|
1263
1263
|
*/
|
|
1264
|
-
export function prints(arg1: Variant): void { _C(
|
|
1264
|
+
export function prints(arg1: Variant): void { _C(0n, 9564, arg1); }
|
|
1265
1265
|
|
|
1266
1266
|
/**
|
|
1267
1267
|
* Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike {@link print}, no newline is automatically added at the end.
|
|
@@ -1277,12 +1277,12 @@ export function prints(arg1: Variant): void { _C(0x1f8019de0016en, 9564, arg1);
|
|
|
1277
1277
|
*
|
|
1278
1278
|
* ```
|
|
1279
1279
|
*/
|
|
1280
|
-
export function printraw(arg1: Variant): void { _C(
|
|
1280
|
+
export function printraw(arg1: Variant): void { _C(0n, 9563, arg1); }
|
|
1281
1281
|
|
|
1282
1282
|
/**
|
|
1283
1283
|
* If verbose mode is enabled ({@link OS.isStdoutVerbose} returning `true`), converts one or more arguments of any type to string in the best way possible and prints them to the console.
|
|
1284
1284
|
*/
|
|
1285
|
-
export function printVerbose(arg1: Variant): void { _C(
|
|
1285
|
+
export function printVerbose(arg1: Variant): void { _C(0n, 9561, arg1); }
|
|
1286
1286
|
|
|
1287
1287
|
/**
|
|
1288
1288
|
* Pushes an error message to Godot's built-in debugger and to the OS terminal.
|
|
@@ -1298,7 +1298,7 @@ export function printVerbose(arg1: Variant): void { _C(0x1f8019de0016en, 9561, a
|
|
|
1298
1298
|
*
|
|
1299
1299
|
* **Note:** This function does not pause project execution. To print an error message and pause project execution in debug builds, use `assert(false, "test error")` instead.
|
|
1300
1300
|
*/
|
|
1301
|
-
export function pushError(arg1: Variant): void { _C(
|
|
1301
|
+
export function pushError(arg1: Variant): void { _C(0n, 9640, arg1); }
|
|
1302
1302
|
|
|
1303
1303
|
/**
|
|
1304
1304
|
* Pushes a warning message to Godot's built-in debugger and to the OS terminal.
|
|
@@ -1310,7 +1310,7 @@ export function pushError(arg1: Variant): void { _C(0x1f8019de0016en, 9640, arg1
|
|
|
1310
1310
|
*
|
|
1311
1311
|
* ```
|
|
1312
1312
|
*/
|
|
1313
|
-
export function pushWarning(arg1: Variant): void { _C(
|
|
1313
|
+
export function pushWarning(arg1: Variant): void { _C(0n, 9663, arg1); }
|
|
1314
1314
|
|
|
1315
1315
|
/**
|
|
1316
1316
|
* Converts a {@link Variant} `variable` to a formatted {@link String} that can then be parsed using {@link strToVar}.
|
|
@@ -1338,7 +1338,7 @@ export function pushWarning(arg1: Variant): void { _C(0x1f8019de0016en, 9663, ar
|
|
|
1338
1338
|
*
|
|
1339
1339
|
* **Note:** Converting {@link Signal} or {@link Callable} is not supported and will result in an empty value for these types, regardless of their data.
|
|
1340
1340
|
*/
|
|
1341
|
-
export function varToStr(variable: Variant): string { return _C(
|
|
1341
|
+
export function varToStr(variable: Variant): string { return _C(0n, 14675, variable) as string; }
|
|
1342
1342
|
|
|
1343
1343
|
/**
|
|
1344
1344
|
* Converts a formatted `string` that was returned by {@link varToStr} to the original {@link Variant}.
|
|
@@ -1352,32 +1352,32 @@ export function varToStr(variable: Variant): string { return _C(0x1f88133a7a7c7n
|
|
|
1352
1352
|
*
|
|
1353
1353
|
* ```
|
|
1354
1354
|
*/
|
|
1355
|
-
export function strToVar(string: string): Variant { return _C(
|
|
1355
|
+
export function strToVar(string: string): Variant { return _C(0n, 13888, string) as Variant; }
|
|
1356
1356
|
|
|
1357
1357
|
/**
|
|
1358
1358
|
* Encodes a {@link Variant} value to a byte array, without encoding objects. Deserialization can be done with {@link bytesToVar}.
|
|
1359
1359
|
* **Note:** If you need object serialization, see {@link varToBytesWithObjects}.
|
|
1360
1360
|
* **Note:** Encoding {@link Callable} is not supported and will result in an empty value, regardless of the data.
|
|
1361
1361
|
*/
|
|
1362
|
-
export function varToBytes(variable: Variant): PackedByteArray { return _C(
|
|
1362
|
+
export function varToBytes(variable: Variant): PackedByteArray { return _C(0n, 14673, variable) as PackedByteArray; }
|
|
1363
1363
|
|
|
1364
1364
|
/**
|
|
1365
1365
|
* Decodes a byte array back to a {@link Variant} value, without decoding objects.
|
|
1366
1366
|
* **Note:** If you need object deserialization, see {@link bytesToVarWithObjects}.
|
|
1367
1367
|
*/
|
|
1368
|
-
export function bytesToVar(bytes: PackedByteArray): Variant { return _C(
|
|
1368
|
+
export function bytesToVar(bytes: PackedByteArray): Variant { return _C(0n, 1963, bytes) as Variant; }
|
|
1369
1369
|
|
|
1370
1370
|
/**
|
|
1371
1371
|
* Encodes a {@link Variant} value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with {@link bytesToVarWithObjects}.
|
|
1372
1372
|
* **Note:** Encoding {@link Callable} is not supported and will result in an empty value, regardless of the data.
|
|
1373
1373
|
*/
|
|
1374
|
-
export function varToBytesWithObjects(variable: Variant): PackedByteArray { return _C(
|
|
1374
|
+
export function varToBytesWithObjects(variable: Variant): PackedByteArray { return _C(0n, 14674, variable) as PackedByteArray; }
|
|
1375
1375
|
|
|
1376
1376
|
/**
|
|
1377
1377
|
* Decodes a byte array back to a {@link Variant} value. Decoding objects is allowed.
|
|
1378
1378
|
* **Warning:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
|
|
1379
1379
|
*/
|
|
1380
|
-
export function bytesToVarWithObjects(bytes: PackedByteArray): Variant { return _C(
|
|
1380
|
+
export function bytesToVarWithObjects(bytes: PackedByteArray): Variant { return _C(0n, 1964, bytes) as Variant; }
|
|
1381
1381
|
|
|
1382
1382
|
/**
|
|
1383
1383
|
* Returns the integer hash of the passed `variable`.
|
|
@@ -1389,7 +1389,7 @@ export function bytesToVarWithObjects(bytes: PackedByteArray): Variant { return
|
|
|
1389
1389
|
*
|
|
1390
1390
|
* ```
|
|
1391
1391
|
*/
|
|
1392
|
-
export function hash(variable: Variant): number { return _C(
|
|
1392
|
+
export function hash(variable: Variant): number { return _C(0n, 7487, variable) as number; }
|
|
1393
1393
|
|
|
1394
1394
|
/**
|
|
1395
1395
|
* Returns the {@link Object} that corresponds to `instanceId`. All Objects have a unique instance ID. See also {@link Object.getInstanceId}.
|
|
@@ -1406,27 +1406,27 @@ export function hash(variable: Variant): number { return _C(0x1f8411374d042n, 74
|
|
|
1406
1406
|
*
|
|
1407
1407
|
* ```
|
|
1408
1408
|
*/
|
|
1409
|
-
export function instanceFromId(instanceId: number): Object { return _C(
|
|
1409
|
+
export function instanceFromId(instanceId: number): Object { return _C(0n, 7646, instanceId) as Object; }
|
|
1410
1410
|
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Returns `true` if the Object that corresponds to `id` is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
|
|
1413
1413
|
*/
|
|
1414
|
-
export function isInstanceIdValid(id: number): boolean { return _C(
|
|
1414
|
+
export function isInstanceIdValid(id: number): boolean { return _C(0n, 8033, id) as boolean; }
|
|
1415
1415
|
|
|
1416
1416
|
/**
|
|
1417
1417
|
* Returns `true` if `instance` is a valid Object (e.g. has not been deleted from memory).
|
|
1418
1418
|
*/
|
|
1419
|
-
export function isInstanceValid(instance: Variant): boolean { return _C(
|
|
1419
|
+
export function isInstanceValid(instance: Variant): boolean { return _C(0n, 8034, instance) as boolean; }
|
|
1420
1420
|
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers.
|
|
1423
1423
|
*/
|
|
1424
|
-
export function ridAllocateId(): number { return _C(
|
|
1424
|
+
export function ridAllocateId(): number { return _C(0n, 10112) as number; }
|
|
1425
1425
|
|
|
1426
1426
|
/**
|
|
1427
1427
|
* Creates an RID from a `base`. This is used mainly from native extensions to build servers.
|
|
1428
1428
|
*/
|
|
1429
|
-
export function ridFromInt64(base: number): RID { return _C(
|
|
1429
|
+
export function ridFromInt64(base: number): RID { return _C(0n, 10113, base) as RID; }
|
|
1430
1430
|
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Returns `true`, for value types, if `a` and `b` share the same value. Returns `true`, for reference types, if the references of `a` and `b` are the same.
|
|
@@ -1452,6 +1452,6 @@ export function ridFromInt64(base: number): RID { return _C(0x12e1cc4239a4n, 101
|
|
|
1452
1452
|
* These are {@link Variant} value types: `null`, {@link bool}, {@link int}, {@link float}, {@link String}, {@link StringName}, {@link Vector2}, {@link Vector2i}, {@link Vector3}, {@link Vector3i}, {@link Vector4}, {@link Vector4i}, {@link Rect2}, {@link Rect2i}, {@link Transform2D}, {@link Transform3D}, {@link Plane}, {@link Quaternion}, {@link AABB}, {@link Basis}, {@link Projection}, {@link Color}, {@link NodePath}, {@link RID}, {@link Callable} and {@link Signal}.
|
|
1453
1453
|
* These are {@link Variant} reference types: {@link Object}, {@link Dictionary}, {@link Array}, {@link PackedByteArray}, {@link PackedInt32Array}, {@link PackedInt64Array}, {@link PackedFloat32Array}, {@link PackedFloat64Array}, {@link PackedStringArray}, {@link PackedVector2Array}, {@link PackedVector3Array}, {@link PackedVector4Array}, and {@link PackedColorArray}.
|
|
1454
1454
|
*/
|
|
1455
|
-
export function isSame(a: Variant, b: Variant): boolean { return _C(
|
|
1455
|
+
export function isSame(a: Variant, b: Variant): boolean { return _C(0n, 8259, a, b) as boolean; }
|
|
1456
1456
|
|
|
1457
1457
|
|