From 3d08becd06d5869297e1a774aa0d3187cbabce10 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 6 Jan 2022 18:37:08 +0800 Subject: [PATCH] Unify similar method descriptions Notably: * `Packed*Array.size()` and `Array.size()`. * Shared methods of `Transform2D` and `Transform3D`. * Shared methods of `Vector2`, `Vector3`, and `Vector2i`. This reduces the Deja Vu when translating the class reference :) --- doc/classes/PackedByteArray.xml | 2 +- doc/classes/PackedColorArray.xml | 2 +- doc/classes/PackedFloat32Array.xml | 2 +- doc/classes/PackedFloat64Array.xml | 2 +- doc/classes/PackedInt32Array.xml | 2 +- doc/classes/PackedInt64Array.xml | 2 +- doc/classes/PackedStringArray.xml | 2 +- doc/classes/PackedVector2Array.xml | 2 +- doc/classes/PackedVector3Array.xml | 2 +- doc/classes/RayCast3D.xml | 3 +-- doc/classes/Transform3D.xml | 6 +++--- doc/classes/Vector2.xml | 12 ++++++------ doc/classes/Vector2i.xml | 4 ++-- doc/classes/Vector3.xml | 10 +++++----- 14 files changed, 26 insertions(+), 27 deletions(-) diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index b16d45b8ca6..686854ffe8f 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -363,7 +363,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 13d7440bb96..d8755493191 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -126,7 +126,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 151014192f0..6c77c4bee20 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -127,7 +127,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index 963a02ace86..a8282c099ae 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -127,7 +127,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index cef113dee9d..da26e93b96b 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -127,7 +127,7 @@ - Returns the array size. + Returns the number of elements in the array. diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 072df519c6f..9ddf43a837a 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -127,7 +127,7 @@ - Returns the array size. + Returns the number of elements in the array. diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 0bded150a3e..439d59dde74 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -127,7 +127,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 8e993c41ab8..8c4f0520163 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -127,7 +127,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index df69e3cd4a4..8229af984d1 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -126,7 +126,7 @@ - Returns the size of the array. + Returns the number of elements in the array. diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 8abd3f84b1c..8a8d6e73f03 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -38,8 +38,7 @@ - Updates the collision information for the ray. - Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index e62cb9216e7..e679a8cfeb1 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -60,13 +60,13 @@ - Interpolates the transform to other Transform3D by weight amount (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). - Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling). @@ -88,7 +88,7 @@ - Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. + Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7e773a0249b..e7faa3ef0fe 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -95,7 +95,7 @@ - Returns the vector with all components rounded up (towards positive infinity). + Returns a new vector with all components rounded up (towards positive infinity). @@ -158,7 +158,7 @@ - Returns the vector with all components rounded down (towards negative infinity). + Returns a new vector with all components rounded down (towards negative infinity). @@ -231,7 +231,7 @@ - Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. + Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. @@ -264,7 +264,7 @@ - Returns the vector projected onto the vector [code]b[/code]. + Returns this vector projected onto the vector [code]b[/code]. @@ -284,13 +284,13 @@ - Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. - Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. + Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index a9334d924f1..74c9c23de01 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -53,7 +53,7 @@ - Returns the ratio of [member x] to [member y]. + Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. @@ -79,7 +79,7 @@ - Returns the vector with each component set to one or negative one, depending on the signs of the components. + Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index da5e4f4f438..8d2ef0ecd98 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -96,7 +96,7 @@ - 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. + Performs a cubic interpolation 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. @@ -201,7 +201,7 @@ - Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. + Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. @@ -246,7 +246,7 @@ - Returns this vector projected onto another vector [code]b[/code]. + Returns this vector projected onto the vector [code]b[/code]. @@ -267,13 +267,13 @@ - Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. - Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. + Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.