summaryrefslogtreecommitdiff
path: root/doc/classes/@GlobalScope.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/@GlobalScope.xml')
-rw-r--r--doc/classes/@GlobalScope.xml162
1 files changed, 89 insertions, 73 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 05e4e209d1..bd500f6b35 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -16,7 +16,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the absolute value of a [Variant] parameter [code]x[/code] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = abs(-1)
# a is 1
@@ -42,7 +42,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the absolute value of float parameter [code]x[/code] (i.e. positive value).
+ Returns the absolute value of float parameter [param x] (i.e. positive value).
[codeblock]
# a is 1.2
var a = absf(-1.2)
@@ -53,7 +53,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
- Returns the absolute value of int parameter [code]x[/code] (i.e. positive value).
+ Returns the absolute value of int parameter [param x] (i.e. positive value).
[codeblock]
# a is 1
var a = absi(-1)
@@ -64,7 +64,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
+ Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
[codeblock]
# c is 0.523599 or 30 degrees if converted with rad2deg(c)
var c = acos(0.866025)
@@ -75,7 +75,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
+ Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
[codeblock]
# s is 0.523599 or 30 degrees if converted with rad2deg(s)
var s = asin(0.5)
@@ -86,12 +86,12 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry.
+ Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry.
The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
[codeblock]
var a = atan(0.5) # a is 0.463648
[/codeblock]
- If [code]x[/code] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [code]x[/code].
+ If [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [param x].
</description>
</method>
<method name="atan2">
@@ -114,7 +114,7 @@
<param index="3" name="end" type="float" />
<param index="4" name="t" type="float" />
<description>
- Returns the point at the given [code]t[/code] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points.
+ Returns the point at the given [param t] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bytes2var">
@@ -137,7 +137,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
var i = ceil(1.45) # i is 2.0
i = ceil(1.001) # i is 2.0
@@ -150,7 +150,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
A type-safe version of [method ceil], specialzied in floats.
</description>
</method>
@@ -158,7 +158,7 @@
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
A type-safe version of [method ceil] that returns integer.
</description>
</method>
@@ -168,7 +168,7 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Clamps the [Variant] [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Clamps the [Variant] [param value] and returns a value not less than [param min] and not more than [param max]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = clamp(-10, -1, 5)
# a is -1
@@ -196,7 +196,7 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps the float [param value] and returns a value not less than [param min] and not more than [param max].
[codeblock]
var speed = 42.1
# a is 20.0
@@ -214,7 +214,7 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps the integer [param value] and returns a value not less than [param min] and not more than [param max].
[codeblock]
var speed = 42
# a is 20
@@ -230,7 +230,7 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the cosine of angle [code]angle_rad[/code] in radians.
+ Returns the cosine of angle [param angle_rad] in radians.
[codeblock]
cos(PI * 2) # Returns 1.0
cos(PI) # Returns -1.0
@@ -242,7 +242,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic cosine of [code]x[/code] in radians.
+ Returns the hyperbolic cosine of [param x] in radians.
[codeblock]
# Prints 1.543081
print(cosh(1))
@@ -257,7 +257,22 @@
<param index="3" name="post" type="float" />
<param index="4" name="weight" type="float" />
<description>
- Cubic interpolates between two values by the factor defined in [code]weight[/code] with pre and post values.
+ Cubic interpolates between two values by the factor defined in [param weight] with pre and post values.
+ </description>
+ </method>
+ <method name="cubic_interpolate_in_time">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <param index="5" name="to_t" type="float" />
+ <param index="6" name="pre_t" type="float" />
+ <param index="7" name="post_t" type="float" />
+ <description>
+ Cubic interpolates between two values by the factor defined in [param weight] with pre and post values.
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
</description>
</method>
<method name="db2linear">
@@ -283,7 +298,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="curve" type="float" />
<description>
- Returns an "eased" value of [code]x[/code] based on an easing function defined with [code]curve[/code]. This easing function is based on an exponent. The [code]curve[/code] can be any floating-point number, with specific values leading to the following behaviors:
+ Returns an "eased" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors:
[codeblock]
- Lower than -1.0 (exclusive): Ease in-out
- 1.0: Linear
@@ -308,7 +323,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]x[/code] and returns it.
+ The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [param x] and returns it.
[b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
For exponents to other bases use the method [method pow].
[codeblock]
@@ -320,7 +335,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
# a is 2.0
var a = floor(2.99)
@@ -335,7 +350,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
A type-safe version of [method floor], specialzied in floats.
</description>
</method>
@@ -343,7 +358,7 @@
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
Equivalent of doing [code]int(x)[/code].
</description>
</method>
@@ -352,7 +367,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="y" type="float" />
<description>
- Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [code]x[/code].
+ Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [param x].
[codeblock]
# Remainder is 1.5
var remainder = fmod(7, 5.5)
@@ -397,7 +412,7 @@
<return type="Object" />
<param index="0" name="instance_id" type="int" />
<description>
- Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
+ Returns the Object that corresponds to [param instance_id]. All Objects have a unique instance ID.
[codeblock]
var foo = "bar"
func _ready():
@@ -413,7 +428,7 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.
+ Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.
[codeblock]
# The interpolation ratio in the `lerp()` call below is 0.75.
var middle = lerp(20, 30, 0.75)
@@ -430,8 +445,8 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other.
- Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
+ Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other.
+ Here, approximately equal means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
Infinity values of the same sign are considered equal.
</description>
</method>
@@ -439,35 +454,35 @@
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity).
+ Returns whether [param x] is an infinity value (either positive infinity or negative infinity).
</description>
</method>
<method name="is_instance_id_valid">
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns [code]true[/code] if the Object that corresponds to [code]instance_id[/code] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
+ Returns [code]true[/code] if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
</description>
</method>
<method name="is_instance_valid">
<return type="bool" />
<param index="0" name="instance" type="Variant" />
<description>
- Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
+ Returns whether [param instance] is a valid object (e.g. has not been deleted from memory).
</description>
</method>
<method name="is_nan">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value.
+ Returns whether [param x] is a NaN ("Not a Number" or invalid) value.
</description>
</method>
<method name="is_zero_approx">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns [code]true[/code] if [code]x[/code] is zero or almost zero.
+ Returns [code]true[/code] if [param x] is zero or almost zero.
This method is faster than using [method is_equal_approx] with one value as zero.
</description>
</method>
@@ -477,8 +492,8 @@
<param index="1" name="to" type="Variant" />
<param index="2" name="weight" type="Variant" />
<description>
- Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired.
- Both [code]from[/code] and [code]to[/code] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired.
+ Both [param from] and [param to] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
@@ -503,7 +518,7 @@
rotation = lerp_angle(min_angle, max_angle, elapsed)
elapsed += delta
[/codeblock]
- [b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
+ [b]Note:[/b] This method lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
</description>
</method>
<method name="lerpf">
@@ -512,7 +527,7 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
@@ -616,8 +631,8 @@
<param index="1" name="to" type="float" />
<param index="2" name="delta" type="float" />
<description>
- Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
- Use a negative [code]delta[/code] value to move away.
+ Moves [param from] toward [param to] by the [param delta] value.
+ Use a negative [param delta] value to move away.
[codeblock]
move_toward(5, 10, 4) # Returns 9
move_toward(10, 5, 4) # Returns 6
@@ -629,7 +644,7 @@
<return type="int" />
<param index="0" name="value" type="int" />
<description>
- Returns the nearest equal or larger power of 2 for integer [code]value[/code].
+ Returns the nearest equal or larger power of 2 for integer [param value].
In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value &lt;= a[/code] for some non-negative integer [code]n[/code].
[codeblock]
nearest_po2(3) # Returns 4
@@ -639,7 +654,7 @@
nearest_po2(0) # Returns 0 (this may not be what you expect)
nearest_po2(-1) # Returns 0 (this may not be what you expect)
[/codeblock]
- [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
+ [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [param value] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
<method name="pingpong">
@@ -647,7 +662,7 @@
<param index="0" name="value" type="float" />
<param index="1" name="length" type="float" />
<description>
- Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive.
+ Returns the [param value] wrapped between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.
[codeblock]
pingpong(-3.0, 3.0) # Returns 3
pingpong(-2.0, 3.0) # Returns 2
@@ -689,7 +704,7 @@
<param index="0" name="base" type="float" />
<param index="1" name="exp" type="float" />
<description>
- Returns the result of [code]base[/code] raised to the power of [code]exp[/code].
+ Returns the result of [param base] raised to the power of [param exp].
[codeblock]
pow(2, 5) # Returns 32
[/codeblock]
@@ -786,7 +801,7 @@
<return type="PackedInt64Array" />
<param index="0" name="seed" type="int" />
<description>
- Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ Random from seed: pass a [param seed], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
</description>
</method>
<method name="randf">
@@ -803,7 +818,7 @@
<param index="0" name="from" type="float" />
<param index="1" name="to" type="float" />
<description>
- Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a random floating point value on the interval between [param from] and [param to] (inclusive).
[codeblock]
prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
[/codeblock]
@@ -814,7 +829,7 @@
<param index="0" name="mean" type="float" />
<param index="1" name="deviation" type="float" />
<description>
- Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution.
</description>
</method>
<method name="randi">
@@ -834,7 +849,7 @@
<param index="0" name="from" type="int" />
<param index="1" name="to" type="int" />
<description>
- Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped.
+ Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped.
[codeblock]
print(randi_range(0, 1)) # Prints 0 or 1
print(randi_range(-10, 1000)) # Prints any number from -10 to 1000
@@ -855,7 +870,7 @@
<param index="3" name="ostart" type="float" />
<param index="4" name="ostop" type="float" />
<description>
- Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [code]value[/code] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired.
+ Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired.
[codeblock]
range_lerp(75, 0, 100, -1, 1) # Returns 0.5
[/codeblock]
@@ -879,7 +894,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
round(2.4) # Returns 2
round(2.5) # Returns 3
@@ -893,7 +908,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
A type-safe version of [method round], specialzied in floats.
</description>
</method>
@@ -901,7 +916,7 @@
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
A type-safe version of [method round] that returns integer.
</description>
</method>
@@ -919,7 +934,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the sign of [code]x[/code] as same type of [Variant] as [code]x[/code] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the sign of [param x] as same type of [Variant] as [param x] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
sign(-6.0) # Returns -1
sign(0.0) # Returns 0
@@ -933,7 +948,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the sign of [code]x[/code] as a float: -1.0 or 1.0. Returns 0.0 if [code]x[/code] is 0.
+ Returns the sign of [param x] as a float: -1.0 or 1.0. Returns 0.0 if [param x] is 0.
[codeblock]
sign(-6.0) # Returns -1.0
sign(0.0) # Returns 0.0
@@ -945,7 +960,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
- Returns the sign of [code]x[/code] as an integer: -1 or 1. Returns 0 if [code]x[/code] is 0.
+ Returns the sign of [param x] as an integer: -1 or 1. Returns 0 if [param x] is 0.
[codeblock]
sign(-6) # Returns -1
sign(0) # Returns 0
@@ -957,7 +972,7 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the sine of angle [code]angle_rad[/code] in radians.
+ Returns the sine of angle [param angle_rad] in radians.
[codeblock]
sin(0.523599) # Returns 0.5
sin(deg2rad(90)) # Returns 1.0
@@ -968,7 +983,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic sine of [code]x[/code].
+ Returns the hyperbolic sine of [param x].
[codeblock]
var a = log(2.0) # Returns 0.693147
sinh(a) # Returns 0.75
@@ -981,8 +996,8 @@
<param index="1" name="to" type="float" />
<param index="2" name="x" type="float" />
<description>
- Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code].
- The return value is [code]0[/code] if [code]x &lt;= from[/code], and [code]1[/code] if [code]x &gt;= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code].
+ Returns the result of smoothly interpolating the value of [param x] between [code]0[/code] and [code]1[/code], based on the where [param x] lies with respect to the edges [param from] and [param to].
+ The return value is [code]0[/code] if [code]x &lt;= from[/code], and [code]1[/code] if [code]x &gt;= to[/code]. If [param x] lies between [param from] and [param to], the returned value follows an S-shaped curve that maps [param x] between [code]0[/code] and [code]1[/code].
This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].
[codeblock]
smoothstep(0, 2, -5.0) # Returns 0.0
@@ -999,7 +1014,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="step" type="float" />
<description>
- Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
+ Snaps float value [param x] to a given [param step]. This can also be used to round a floating point number to an arbitrary number of decimals.
[codeblock]
snapped(100, 32) # Returns 96
snapped(3.14159, 0.01) # Returns 3.14
@@ -1011,11 +1026,11 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the square root of [code]x[/code], where [code]x[/code] is a non-negative number.
+ Returns the square root of [param x], where [param x] is a non-negative number.
[codeblock]
sqrt(9) # Returns 3
[/codeblock]
- [b]Note:[/b] Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
+ [b]Note:[/b] Negative values of [param x] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
</description>
</method>
<method name="step_decimals">
@@ -1055,7 +1070,7 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the tangent of angle [code]angle_rad[/code] in radians.
+ Returns the tangent of angle [param angle_rad] in radians.
[codeblock]
tan(deg2rad(45)) # Returns 1
[/codeblock]
@@ -1065,7 +1080,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic tangent of [code]x[/code].
+ Returns the hyperbolic tangent of [param x].
[codeblock]
var a = log(2.0) # Returns 0.693147
tanh(a) # Returns 0.6
@@ -1107,7 +1122,7 @@
<return type="String" />
<param index="0" name="variable" type="Variant" />
<description>
- Converts a Variant [code]variable[/code] to a formatted string that can later be parsed using [method str2var].
+ Converts a Variant [param variable] to a formatted string that can later be parsed using [method str2var].
[codeblock]
a = { "a": 1, "b": 2 }
print(var2str(a))
@@ -1135,7 +1150,7 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Wraps the [Variant] [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Wraps the [Variant] [param value] between [param min] and [param max].
Usable for creating loop-alike behavior or infinite surfaces.
Variant types [int] and [float] (real) are supported. If any of the argument is [float] the result will be [float], otherwise it is [int].
[codeblock]
@@ -1156,7 +1171,7 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Wraps float [param value] between [param min] and [param max].
Usable for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5.0 and 9.9
@@ -1170,7 +1185,7 @@
# Infinite rotation (in radians)
angle = wrapf(angle + 0.1, -PI, PI)
[/codeblock]
- [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
+ [b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
[code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
</description>
</method>
@@ -1180,7 +1195,7 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Wraps integer [param value] between [param min] and [param max].
Usable for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5 and 9
@@ -1288,10 +1303,8 @@
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
- <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter="">
- The [VisualScriptCustomNodes] singleton.
- </member>
<member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter="">
+ The [WorkerThreadPool] singleton.
</member>
<member name="XRServer" type="XRServer" setter="" getter="">
The [XRServer] singleton.
@@ -2573,7 +2586,7 @@
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
- Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider.
+ Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians"[/code] for editing radian angles in degrees, [code]"degrees"[/code] to hint at an angle and [code]"no_slider"[/code] to hide the slider.
</constant>
<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string.
@@ -2584,7 +2597,7 @@
Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
</constant>
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
- Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
+ Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero.
</constant>
<constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint">
Hints that a vector property should allow linking values (e.g. to edit both [code]x[/code] and [code]y[/code] together).
@@ -2695,7 +2708,10 @@
</constant>
<constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="45" enum="PropertyHint">
+ Hints that a quaternion property should disable the temporary euler editor.
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="46" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>