summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Basis.xml4
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/Color.xml4
-rw-r--r--doc/classes/Quat.xml12
-rw-r--r--doc/classes/RandomNumberGenerator.xml22
-rw-r--r--doc/classes/Tabs.xml4
-rw-r--r--doc/classes/Transform2D.xml4
-rw-r--r--doc/classes/Vector2.xml12
-rw-r--r--doc/classes/Vector3.xml14
-rw-r--r--doc/classes/XRController3D.xml2
10 files changed, 49 insertions, 31 deletions
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 877d3ca85a..4c9cd5702e 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -201,9 +201,9 @@
<method name="slerp">
<return type="Basis">
</return>
- <argument index="0" name="b" type="Basis">
+ <argument index="0" name="to" type="Basis">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index bd648c6de0..fcdd072c80 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -608,7 +608,7 @@
Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing.
</description>
</signal>
- <signal name="hide">
+ <signal name="hidden">
<description>
Emitted when becoming hidden.
</description>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 89c5e355ec..755fd7eea2 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -164,9 +164,9 @@
<method name="lerp">
<return type="Color">
</return>
- <argument index="0" name="b" type="Color">
+ <argument index="0" name="to" type="Color">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1.
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 00ad4ee934..425e82c744 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -92,10 +92,10 @@
</argument>
<argument index="2" name="post_b" type="Quat">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code].
+ Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
</description>
</method>
<method name="dot">
@@ -261,9 +261,9 @@
<method name="slerp">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="to" type="Quat">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
@@ -273,9 +273,9 @@
<method name="slerpni">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="to" type="Quat">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index dcb75dc275..6312cd18aa 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -13,6 +13,7 @@
rng.randomize()
var my_random_number = rng.randf_range(-10.0, 10.0)
[/codeblock]
+ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
<link title="Random number generation">https://docs.godotengine.org/en/latest/tutorials/math/random_number_generation.html</link>
@@ -75,9 +76,26 @@
</methods>
<members>
<member name="seed" type="int" setter="set_seed" getter="get_seed" default="0">
- The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.
+ Initializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers.
[b]Note:[/b] The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally.
- [b]Note:[/b] The default value of this property is pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
+ [b]Note:[/b] Setting this property produces a side effect of changing the internal [member state], so make sure to initialize the seed [i]before[/i] modifying the [member state]:
+ [codeblock]
+ var rng = RandomNumberGenerator.new()
+ rng.seed = hash("Godot")
+ rng.state = 100 # Restore to some previously saved state.
+ [/codeblock]
+ </member>
+ <member name="state" type="int" setter="set_state" getter="get_state" default="0">
+ The current state of the random number generator. Save and restore this property to restore the generator to a previous state:
+ [codeblock]
+ var rng = RandomNumberGenerator.new()
+ print(rng.randf())
+ var saved_state = rng.state # Store current state.
+ print(rng.randf()) # Advance internal state.
+ rng.state = saved_state # Restore the state.
+ print(rng.randf()) # Prints the same value as in previous.
+ [/codeblock]
+ [b]Note:[/b] Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [member seed] instead.
</member>
</members>
<constants>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 5c698a4aa8..47cf869fe9 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -299,14 +299,14 @@
Emitted when a tab is clicked, even if it is the current tab.
</description>
</signal>
- <signal name="tab_close">
+ <signal name="tab_closed">
<argument index="0" name="tab" type="int">
</argument>
<description>
Emitted when a tab is closed.
</description>
</signal>
- <signal name="tab_hover">
+ <signal name="tab_hovered">
<argument index="0" name="tab" type="int">
</argument>
<description>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index ff291663fa..406774cbfe 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -107,10 +107,10 @@
</return>
<argument index="0" name="xform" type="Transform2D">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
- Returns a transform interpolated between this transform and another by a given weight (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index f99231de39..4e79560f3e 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -137,10 +137,10 @@
</argument>
<argument index="2" name="post_b" type="Vector2">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -224,9 +224,9 @@
<method name="lerp">
<return type="Vector2">
</return>
- <argument index="0" name="with" type="Vector2">
+ <argument index="0" name="to" type="Vector2">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
@@ -452,9 +452,9 @@
<method name="slerp">
<return type="Vector2">
</return>
- <argument index="0" name="with" type="Vector2">
+ <argument index="0" name="to" type="Vector2">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 6ba0d6ab8d..2c2b30a644 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -105,10 +105,10 @@
</argument>
<argument index="2" name="post_b" type="Vector3">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -199,12 +199,12 @@
<method name="lerp">
<return type="Vector3">
</return>
- <argument index="0" name="b" type="Vector3">
+ <argument index="0" name="to" type="Vector3">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="max_axis">
@@ -468,9 +468,9 @@
<method name="slerp">
<return type="Vector3">
</return>
- <argument index="0" name="b" type="Vector3">
+ <argument index="0" name="to" type="Vector3">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index c0f64d9e27..78684d10ee 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -86,7 +86,7 @@
Emitted when a button on this controller is pressed.
</description>
</signal>
- <signal name="button_release">
+ <signal name="button_released">
<argument index="0" name="button" type="int">
</argument>
<description>