diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-09 17:46:03 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-09 23:39:53 +0100 |
commit | 0f249f5c0aa2c3a89848f03f155b76e834e4c32a (patch) | |
tree | 4fa6ebf28401601e03b0ce2b387f60c32b771fb5 /doc/classes | |
parent | efc4d217d61f592a16ebab30731ff9f595dee2cf (diff) |
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
Diffstat (limited to 'doc/classes')
36 files changed, 594 insertions, 503 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 2b1770f12b..ee65bbc07e 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1594,43 +1594,40 @@ <constant name="OP_MODULE" value="12" enum="Variant.Operator"> Remainder/modulo operator ([code]%[/code]). </constant> - <constant name="OP_STRING_CONCAT" value="13" enum="Variant.Operator"> - String concatenation operator ([code]+[/code]). - </constant> - <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator"> + <constant name="OP_SHIFT_LEFT" value="13" enum="Variant.Operator"> Left shift operator ([code]<<[/code]). </constant> - <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator"> + <constant name="OP_SHIFT_RIGHT" value="14" enum="Variant.Operator"> Right shift operator ([code]>>[/code]). </constant> - <constant name="OP_BIT_AND" value="16" enum="Variant.Operator"> + <constant name="OP_BIT_AND" value="15" enum="Variant.Operator"> Bitwise AND operator ([code]&[/code]). </constant> - <constant name="OP_BIT_OR" value="17" enum="Variant.Operator"> + <constant name="OP_BIT_OR" value="16" enum="Variant.Operator"> Bitwise OR operator ([code]|[/code]). </constant> - <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator"> + <constant name="OP_BIT_XOR" value="17" enum="Variant.Operator"> Bitwise XOR operator ([code]^[/code]). </constant> - <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator"> + <constant name="OP_BIT_NEGATE" value="18" enum="Variant.Operator"> Bitwise NOT operator ([code]~[/code]). </constant> - <constant name="OP_AND" value="20" enum="Variant.Operator"> + <constant name="OP_AND" value="19" enum="Variant.Operator"> Logical AND operator ([code]and[/code] or [code]&&[/code]). </constant> - <constant name="OP_OR" value="21" enum="Variant.Operator"> + <constant name="OP_OR" value="20" enum="Variant.Operator"> Logical OR operator ([code]or[/code] or [code]||[/code]). </constant> - <constant name="OP_XOR" value="22" enum="Variant.Operator"> + <constant name="OP_XOR" value="21" enum="Variant.Operator"> Logical XOR operator (not implemented in GDScript). </constant> - <constant name="OP_NOT" value="23" enum="Variant.Operator"> + <constant name="OP_NOT" value="22" enum="Variant.Operator"> Logical NOT operator ([code]not[/code] or [code]![/code]). </constant> - <constant name="OP_IN" value="24" enum="Variant.Operator"> + <constant name="OP_IN" value="23" enum="Variant.Operator"> Logical IN operator ([code]in[/code]). </constant> - <constant name="OP_MAX" value="25" enum="Variant.Operator"> + <constant name="OP_MAX" value="24" enum="Variant.Operator"> Represents the size of the [enum Variant.Operator] enum. </constant> </constants> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 4f95b44f83..a4972612d9 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -17,6 +17,22 @@ <method name="AABB"> <return type="AABB"> </return> + <description> + Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="AABB"> + <return type="AABB"> + </return> + <argument index="0" name="from" type="AABB"> + </argument> + <description> + Constructs an [AABB] as a copy of the given [AABB]. + </description> + </method> + <method name="AABB"> + <return type="AABB"> + </return> <argument index="0" name="position" type="Vector3"> </argument> <argument index="1" name="size" type="Vector3"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index d0f90f513d..86ef5bef4c 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -46,37 +46,44 @@ <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedColorArray"> + <description> + Constructs an empty [Array]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="Array"> </argument> <description> - Constructs an array from a [PackedColorArray]. + Constructs an [Array] as a copy of the given [Array]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedVector3Array"> + <argument index="0" name="from" type="PackedByteArray"> </argument> <description> - Constructs an array from a [PackedVector3Array]. + Constructs an array from a [PackedByteArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedVector2Array"> + <argument index="0" name="from" type="PackedColorArray"> </argument> <description> - Constructs an array from a [PackedVector2Array]. + Constructs an array from a [PackedColorArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedStringArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs an array from a [PackedStringArray]. + Constructs an array from a [PackedFloat32Array]. </description> </method> <method name="Array"> @@ -91,10 +98,10 @@ <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedFloat32Array"> + <argument index="0" name="from" type="PackedInt32Array"> </argument> <description> - Constructs an array from a [PackedFloat32Array]. + Constructs an array from a [PackedInt32Array]. </description> </method> <method name="Array"> @@ -109,19 +116,28 @@ <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedInt32Array"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs an array from a [PackedInt32Array]. + Constructs an array from a [PackedStringArray]. </description> </method> <method name="Array"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedByteArray"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs an array from a [PackedByteArray]. + Constructs an array from a [PackedVector2Array]. + </description> + </method> + <method name="Array"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs an array from a [PackedVector3Array]. </description> </method> <method name="append"> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 4201a31402..908f316e4e 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -22,20 +22,17 @@ <method name="Basis"> <return type="Basis"> </return> - <argument index="0" name="from" type="Quat"> - </argument> <description> - Constructs a pure rotation basis matrix from the given quaternion. + Constructs a default-initialized [Basis] set to [constant IDENTITY]. </description> </method> <method name="Basis"> <return type="Basis"> </return> - <argument index="0" name="from" type="Vector3"> + <argument index="0" name="from" type="Basis"> </argument> <description> - Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). - Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + Constructs a [Basis] as a copy of the given [Basis]. </description> </method> <method name="Basis"> @@ -52,6 +49,25 @@ <method name="Basis"> <return type="Basis"> </return> + <argument index="0" name="euler" type="Vector3"> + </argument> + <description> + Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). + Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + </description> + </method> + <method name="Basis"> + <return type="Basis"> + </return> + <argument index="0" name="from" type="Quat"> + </argument> + <description> + Constructs a pure rotation basis matrix from the given quaternion. + </description> + </method> + <method name="Basis"> + <return type="Basis"> + </return> <argument index="0" name="x_axis" type="Vector3"> </argument> <argument index="1" name="y_axis" type="Vector3"> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 7aaf087540..c31efc2581 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -39,12 +39,28 @@ <method name="Callable"> <return type="Callable"> </return> + <description> + Constructs a null [Callable] with no object nor method bound. + </description> + </method> + <method name="Callable"> + <return type="Callable"> + </return> + <argument index="0" name="from" type="Callable"> + </argument> + <description> + Constructs a [Callable] as a copy of the given [Callable]. + </description> + </method> + <method name="Callable"> + <return type="Callable"> + </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method_name" type="StringName"> + <argument index="1" name="method" type="StringName"> </argument> <description> - Creates a new [Callable] for the method called [code]method_name[/code] in the specified [code]object[/code]. + Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code]. </description> </method> <method name="bind" qualifiers="vararg"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ca52d27a52..721fea8a19 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -19,71 +19,28 @@ <method name="Color"> <return type="Color"> </return> - <argument index="0" name="from" type="String"> - </argument> <description> - Constructs a color from an HTML hexadecimal color string in RGB or RGBA format. See also [method @GDScript.ColorN]. - [codeblocks] - [gdscript] - # Each of the following creates the same color RGBA(178, 217, 10, 255). - var c3 = Color("#b2d90a") # RGB format with "#". - var c4 = Color("b2d90a") # RGB format. - var c1 = Color("#b2d90aff") # RGBA format with "#". - var c2 = Color("b2d90aff") # RGBA format. - [/gdscript] - [csharp] - // Each of the following creates the same color RGBA(178, 217, 10, 255). - var c3 = new Color("#b2d90a"); - var c4 = new Color("b2d90a"); // RGB format. - var c1 = new Color("#b2d90aff"); - var c2 = new Color("b2d90aff"); // RGBA format. - [/csharp] - [/codeblocks] - You can also use the "web color" short-hand form by only using 3 or 4 digits. - [codeblocks] - [gdscript] - # Each of the following creates the same color RGBA(17, 34, 51, 255). - var c3 = Color("#123") # RGB format with "#". - var c4 = Color("123") # RGB format. - var c1 = Color("#123f") # RGBA format with "#". - var c2 = Color("123f") # RGBA format. - [/gdscript] - [csharp] - // Each of the following creates the same color RGBA(17, 34, 51, 255). - var c3 = new Color("#123"); - var c4 = new Color("123"); // RGB format. - var c1 = new Color("#123f"); - var c2 = new Color("123f"); // RGBA format. - [/csharp] - [/codeblocks] + Constructs a default-initialized [Color] with all components set to [code]0[/code]. </description> </method> <method name="Color"> <return type="Color"> </return> - <argument index="0" name="from" type="int"> + <argument index="0" name="from" type="Color"> </argument> <description> - Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). - [codeblocks] - [gdscript] - var c = Color(274) # Equivalent to RGBA(0, 0, 1, 18) - [/gdscript] - [csharp] - var c = new Color(274); // Equivalent to RGBA(0, 0, 1, 18) - [/csharp] - [/codeblocks] + Constructs a [Color] as a copy of the given [Color]. </description> </method> <method name="Color"> <return type="Color"> </return> - <argument index="0" name="c" type="Color"> + <argument index="0" name="from" type="Color"> </argument> - <argument index="1" name="a" type="float"> + <argument index="1" name="alpha" type="float"> </argument> <description> - Constructs a color from an existing color, but with a custom alpha value. + Constructs a [Color] from an existing color, but with a custom alpha value. [codeblocks] [gdscript] var red = Color(Color.red, 0.5) # 50% transparent red. @@ -103,14 +60,16 @@ </argument> <argument index="2" name="b" type="float"> </argument> + <argument index="3" name="a" type="float"> + </argument> <description> - Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. + Constructs a [Color] from an RGBA profile using values between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) + var color = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Equivalent to RGBA(51, 255, 178, 255) + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Equivalent to RGBA(51, 255, 178, 255, 204) [/csharp] [/codeblocks] </description> @@ -124,16 +83,14 @@ </argument> <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="float"> - </argument> <description> - Constructs a color from an RGBA profile using values between 0 and 1. + Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) + var color = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Equivalent to RGBA(51, 255, 178, 255, 204) + var color = new Color(0.2f, 1.0f, 0.7f); // Equivalent to RGBA(51, 255, 178, 255) [/csharp] [/codeblocks] </description> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 8bdaeb9211..91a04b1f28 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -132,7 +132,7 @@ // Try to contact server Dtls.PutPacket("The Answer Is..42!".ToUTF8()); } - while (Dtls.GetAvailablePacketCount() > 0) + while (Dtls.GetAvailablePacketCount() > 0) { GD.Print("Connected: " + Dtls.GetPacket().GetStringFromUTF8()); Connected = true; diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8095d95551..a7a3632fef 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -171,6 +171,22 @@ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> + <method name="Dictionary"> + <return type="Dictionary"> + </return> + <description> + Constructs an empty [Dictionary]. + </description> + </method> + <method name="Dictionary"> + <return type="Dictionary"> + </return> + <argument index="0" name="from" type="Dictionary"> + </argument> + <description> + Constructs a [Dictionary] as a copy of the given [Dictionary]. + </description> + </method> <method name="clear"> <return type="void"> </return> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml deleted file mode 100644 index dc9246ad35..0000000000 --- a/doc/classes/FuncRef.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="FuncRef" inherits="Reference" version="4.0"> - <brief_description> - Reference to a function in an object. - </brief_description> - <description> - In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. - However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called. - </description> - <tutorials> - </tutorials> - <methods> - <method name="call_func" qualifiers="vararg"> - <return type="Variant"> - </return> - <description> - Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. - </description> - </method> - <method name="call_funcv"> - <return type="Variant"> - </return> - <argument index="0" name="arg_array" type="Array"> - </argument> - <description> - Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]. - </description> - </method> - <method name="is_valid" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns whether the object still exists and has the function assigned. - </description> - </method> - <method name="set_instance"> - <return type="void"> - </return> - <argument index="0" name="instance" type="Object"> - </argument> - <description> - The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. - </description> - </method> - </methods> - <members> - <member name="function" type="StringName" setter="set_function" getter="get_function" default="@"""> - The name of the referenced function. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index f711ba4d6b..980bea0d9f 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -28,6 +28,22 @@ <method name="NodePath"> <return type="NodePath"> </return> + <description> + Constructs an empty [NodePath]. + </description> + </method> + <method name="NodePath"> + <return type="NodePath"> + </return> + <argument index="0" name="from" type="NodePath"> + </argument> + <description> + Constructs a [NodePath] as a copy of the given [NodePath]. + </description> + </method> + <method name="NodePath"> + <return type="NodePath"> + </return> <argument index="0" name="from" type="String"> </argument> <description> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 7c2d566466..5ac5f15fb2 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -13,6 +13,22 @@ <method name="PackedByteArray"> <return type="PackedByteArray"> </return> + <description> + Constructs an empty [PackedByteArray]. + </description> + </method> + <method name="PackedByteArray"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="from" type="PackedByteArray"> + </argument> + <description> + Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]. + </description> + </method> + <method name="PackedByteArray"> + <return type="PackedByteArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index c42d14c5bd..e4b9e02be7 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -13,6 +13,22 @@ <method name="PackedColorArray"> <return type="PackedColorArray"> </return> + <description> + Constructs an empty [PackedColorArray]. + </description> + </method> + <method name="PackedColorArray"> + <return type="PackedColorArray"> + </return> + <argument index="0" name="from" type="PackedColorArray"> + </argument> + <description> + Constructs a [PackedColorArray] as a copy of the given [PackedColorArray]. + </description> + </method> + <method name="PackedColorArray"> + <return type="PackedColorArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index dd84648251..1b2091f72b 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -14,6 +14,22 @@ <method name="PackedFloat32Array"> <return type="PackedFloat32Array"> </return> + <description> + Constructs an empty [PackedFloat32Array]. + </description> + </method> + <method name="PackedFloat32Array"> + <return type="PackedFloat32Array"> + </return> + <argument index="0" name="from" type="PackedFloat32Array"> + </argument> + <description> + Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array]. + </description> + </method> + <method name="PackedFloat32Array"> + <return type="PackedFloat32Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index 91c3f4874b..a55ac6bacc 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -14,6 +14,22 @@ <method name="PackedFloat64Array"> <return type="PackedFloat64Array"> </return> + <description> + Constructs an empty [PackedFloat64Array]. + </description> + </method> + <method name="PackedFloat64Array"> + <return type="PackedFloat64Array"> + </return> + <argument index="0" name="from" type="PackedFloat64Array"> + </argument> + <description> + Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array]. + </description> + </method> + <method name="PackedFloat64Array"> + <return type="PackedFloat64Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index a0a9922d0c..ecf8abd1eb 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -14,6 +14,22 @@ <method name="PackedInt32Array"> <return type="PackedInt32Array"> </return> + <description> + Constructs an empty [PackedInt32Array]. + </description> + </method> + <method name="PackedInt32Array"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="from" type="PackedInt32Array"> + </argument> + <description> + Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array]. + </description> + </method> + <method name="PackedInt32Array"> + <return type="PackedInt32Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 542dabcfa0..a254a6ff5f 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -14,6 +14,22 @@ <method name="PackedInt64Array"> <return type="PackedInt64Array"> </return> + <description> + Constructs an empty [PackedInt64Array]. + </description> + </method> + <method name="PackedInt64Array"> + <return type="PackedInt64Array"> + </return> + <argument index="0" name="from" type="PackedInt64Array"> + </argument> + <description> + Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array]. + </description> + </method> + <method name="PackedInt64Array"> + <return type="PackedInt64Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 7c710cf0fb..c50ec38a93 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -14,6 +14,22 @@ <method name="PackedStringArray"> <return type="PackedStringArray"> </return> + <description> + Constructs an empty [PackedStringArray]. + </description> + </method> + <method name="PackedStringArray"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="from" type="PackedStringArray"> + </argument> + <description> + Constructs a [PackedStringArray] as a copy of the given [PackedStringArray]. + </description> + </method> + <method name="PackedStringArray"> + <return type="PackedStringArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 98034afc93..0bd658c488 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -14,6 +14,22 @@ <method name="PackedVector2Array"> <return type="PackedVector2Array"> </return> + <description> + Constructs an empty [PackedVector2Array]. + </description> + </method> + <method name="PackedVector2Array"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="from" type="PackedVector2Array"> + </argument> + <description> + Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array]. + </description> + </method> + <method name="PackedVector2Array"> + <return type="PackedVector2Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 3db33fbcd9..5b835f2fbf 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -13,6 +13,22 @@ <method name="PackedVector3Array"> <return type="PackedVector3Array"> </return> + <description> + Constructs an empty [PackedVector3Array]. + </description> + </method> + <method name="PackedVector3Array"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array]. + </description> + </method> + <method name="PackedVector3Array"> + <return type="PackedVector3Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 9352eee1eb..bb0b25a552 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -13,6 +13,22 @@ <method name="Plane"> <return type="Plane"> </return> + <description> + Constructs a default-initialized [Plane] with all components set to [code]0[/code]. + </description> + </method> + <method name="Plane"> + <return type="Plane"> + </return> + <argument index="0" name="from" type="Plane"> + </argument> + <description> + Constructs a [Plane] as a copy of the given [Plane]. + </description> + </method> + <method name="Plane"> + <return type="Plane"> + </return> <argument index="0" name="a" type="float"> </argument> <argument index="1" name="b" type="float"> @@ -28,25 +44,36 @@ <method name="Plane"> <return type="Plane"> </return> - <argument index="0" name="v1" type="Vector3"> + <argument index="0" name="normal" type="Vector3"> + </argument> + <argument index="1" name="d" type="float"> </argument> - <argument index="1" name="v2" type="Vector3"> + <description> + Creates a plane from the normal and the plane's distance to the origin. + </description> + </method> + <method name="Plane"> + <return type="Plane"> + </return> + <argument index="0" name="point" type="Vector3"> </argument> - <argument index="2" name="v3" type="Vector3"> + <argument index="1" name="normal" type="Vector3"> </argument> <description> - Creates a plane from the three points, given in clockwise order. + Creates a plane from the given position and a plane normal. </description> </method> <method name="Plane"> <return type="Plane"> </return> - <argument index="0" name="normal" type="Vector3"> + <argument index="0" name="point1" type="Vector3"> </argument> - <argument index="1" name="d" type="float"> + <argument index="1" name="point2" type="Vector3"> + </argument> + <argument index="2" name="point3" type="Vector3"> </argument> <description> - Creates a plane from the normal and the plane's distance to the origin. + Creates a plane from the three points, given in clockwise order. </description> </method> <method name="center"> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 76cfa0d99d..edfe99a8b8 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -16,16 +16,27 @@ <method name="Quat"> <return type="Quat"> </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> + <description> + Constructs a default-initialized quaternion with all components set to [code]0[/code]. + </description> + </method> + <method name="Quat"> + <return type="Quat"> + </return> + <argument index="0" name="from" type="Quat"> </argument> - <argument index="2" name="z" type="float"> + <description> + Constructs a [Quat] as a copy of the given [Quat]. + </description> + </method> + <method name="Quat"> + <return type="Quat"> + </return> + <argument index="0" name="arc_from" type="Vector3"> </argument> - <argument index="3" name="w" type="float"> + <argument index="1" name="arc_to" type="Vector3"> </argument> <description> - Constructs a quaternion defined by the given values. </description> </method> <method name="Quat"> @@ -57,6 +68,21 @@ Constructs a quaternion from the given [Basis]. </description> </method> + <method name="Quat"> + <return type="Quat"> + </return> + <argument index="0" name="x" type="float"> + </argument> + <argument index="1" name="y" type="float"> + </argument> + <argument index="2" name="z" type="float"> + </argument> + <argument index="3" name="w" type="float"> + </argument> + <description> + Constructs a quaternion defined by the given values. + </description> + </method> <method name="cubic_slerp"> <return type="Quat"> </return> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 644c427120..d944f7a86a 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -12,10 +12,17 @@ <method name="RID"> <return type="RID"> </return> - <argument index="0" name="from" type="Object"> + <description> + Constructs an empty [RID] with the invalid ID [code]0[/code]. + </description> + </method> + <method name="RID"> + <return type="RID"> + </return> + <argument index="0" name="from" type="RID"> </argument> <description> - Creates a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0. + Constructs a [RID] as a copy of the given [RID]. </description> </method> <method name="get_id"> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index a72ba35a98..b970d0188c 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -17,6 +17,31 @@ <method name="Rect2"> <return type="Rect2"> </return> + <description> + Constructs a default-initialized [Rect2] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="Rect2"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a [Rect2] as a copy of the given [Rect2]. + </description> + </method> + <method name="Rect2"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2] from a [Rect2i]. + </description> + </method> + <method name="Rect2"> + <return type="Rect2"> + </return> <argument index="0" name="position" type="Vector2"> </argument> <argument index="1" name="size" type="Vector2"> @@ -40,15 +65,6 @@ Constructs a [Rect2] by x, y, width, and height. </description> </method> - <method name="Rect2"> - <return type="Rect2"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> - <description> - Constructs a [Rect2] from a [Rect2i]. - </description> - </method> <method name="abs"> <return type="Rect2"> </return> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index de2932e816..5c9162baf4 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -15,6 +15,31 @@ <method name="Rect2i"> <return type="Rect2i"> </return> + <description> + Constructs a default-initialized [Rect2i] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2i] as a copy of the given [Rect2i]. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. + </description> + </method> + <method name="Rect2i"> + <return type="Rect2i"> + </return> <argument index="0" name="position" type="Vector2i"> </argument> <argument index="1" name="size" type="Vector2i"> @@ -38,15 +63,6 @@ Constructs a [Rect2i] by x, y, width, and height. </description> </method> - <method name="Rect2i"> - <return type="Rect2i"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> - <description> - Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. - </description> - </method> <method name="abs"> <return type="Rect2i"> </return> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 51490caf6f..bd091899ac 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -11,12 +11,28 @@ <method name="Signal"> <return type="Signal"> </return> + <description> + Constructs a null [Signal] with no object nor signal name bound. + </description> + </method> + <method name="Signal"> + <return type="Signal"> + </return> + <argument index="0" name="from" type="Signal"> + </argument> + <description> + Constructs a [Signal] as a copy of the given [Signal]. + </description> + </method> + <method name="Signal"> + <return type="Signal"> + </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="signal_name" type="StringName"> + <argument index="1" name="signal" type="StringName"> </argument> <description> - Creates a new signal named [code]signal_name[/code] in the given object. + Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code]. </description> </method> <method name="connect"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index fcd8f57cd1..a600a575aa 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -13,154 +13,17 @@ <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="bool"> - </argument> - <description> - Constructs a new String from the given [bool]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <description> - Constructs a new String from the given [int]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <description> - Constructs a new String from the given [float]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <description> - Constructs a new String from the given [Vector2]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector2i"> - </argument> - <description> - Constructs a new String from the given [Vector2i]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> - <description> - Constructs a new String from the given [Rect2]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> - <description> - Constructs a new String from the given [Rect2i]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <description> - Constructs a new String from the given [Vector3]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector3i"> - </argument> - <description> - Constructs a new String from the given [Vector3i]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Transform2D"> - </argument> - <description> - Constructs a new String from the given [Transform2D]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Plane"> - </argument> - <description> - Constructs a new String from the given [Plane]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Quat"> - </argument> - <description> - Constructs a new String from the given [Quat]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="AABB"> - </argument> - <description> - Constructs a new String from the given [AABB]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Basis"> - </argument> - <description> - Constructs a new String from the given [Basis]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Transform"> - </argument> - <description> - Constructs a new String from the given [Transform]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Color"> - </argument> <description> - Constructs a new String from the given [Color]. + Constructs an empty [String] ([code]""[/code]). </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="StringName"> + <argument index="0" name="from" type="String"> </argument> <description> - Constructs a new String from the given [StringName]. + Constructs a [String] as a copy of the given [String]. </description> </method> <method name="String"> @@ -175,127 +38,10 @@ <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="RID"> - </argument> - <description> - Constructs a new String from the given [RID]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Callable"> - </argument> - <description> - Constructs a new String from the given [Callable]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Signal"> - </argument> - <description> - Constructs a new String from the given [Signal]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Dictionary"> - </argument> - <description> - Constructs a new String from the given [Dictionary]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Array"> - </argument> - <description> - Constructs a new String from the given [Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedByteArray"> - </argument> - <description> - Constructs a new String from the given [PackedByteArray]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedInt32Array"> - </argument> - <description> - Constructs a new String from the given [PackedInt32Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedInt64Array"> - </argument> - <description> - Constructs a new String from the given [PackedInt64Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedFloat32Array"> - </argument> - <description> - Constructs a new String from the given [PackedFloat32Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedFloat64Array"> - </argument> - <description> - Constructs a new String from the given [PackedFloat64Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedStringArray"> - </argument> - <description> - Constructs a new String from the given [PackedStringArray]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedVector2Array"> - </argument> - <description> - Constructs a new String from the given [PackedVector2Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedVector3Array"> - </argument> - <description> - Constructs a new String from the given [PackedVector3Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedColorArray"> + <argument index="0" name="from" type="StringName"> </argument> <description> - Constructs a new String from the given [PackedColorArray]. + Constructs a new String from the given [StringName]. </description> </method> <method name="begins_with"> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 5d8ac6fdcc..a847d44120 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -12,6 +12,22 @@ <method name="StringName"> <return type="StringName"> </return> + <description> + Constructs an empty [StringName]. + </description> + </method> + <method name="StringName"> + <return type="StringName"> + </return> + <argument index="0" name="from" type="StringName"> + </argument> + <description> + Constructs a [StringName] as a copy of the given [StringName]. + </description> + </method> + <method name="StringName"> + <return type="StringName"> + </return> <argument index="0" name="from" type="String"> </argument> <description> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 8e539e64f7..920a6c704e 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -19,54 +19,43 @@ <method name="Transform"> <return type="Transform"> </return> - <argument index="0" name="x_axis" type="Vector3"> - </argument> - <argument index="1" name="y_axis" type="Vector3"> - </argument> - <argument index="2" name="z_axis" type="Vector3"> - </argument> - <argument index="3" name="origin" type="Vector3"> - </argument> <description> - Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a default-initialized [Transform] set to [constant IDENTITY]. </description> </method> <method name="Transform"> <return type="Transform"> </return> - <argument index="0" name="basis" type="Basis"> - </argument> - <argument index="1" name="origin" type="Vector3"> + <argument index="0" name="from" type="Transform"> </argument> <description> - Constructs a Transform from a [Basis] and [Vector3]. + Constructs a [Transform] as a copy of the given [Transform]. </description> </method> <method name="Transform"> <return type="Transform"> </return> - <argument index="0" name="from" type="Transform2D"> + <argument index="0" name="basis" type="Basis"> </argument> - <description> - Constructs a Transform from a [Transform2D]. - </description> - </method> - <method name="Transform"> - <return type="Transform"> - </return> - <argument index="0" name="from" type="Quat"> + <argument index="1" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from a [Quat]. The origin will be [code]Vector3(0, 0, 0)[/code]. + Constructs a Transform from a [Basis] and [Vector3]. </description> </method> <method name="Transform"> <return type="Transform"> </return> - <argument index="0" name="from" type="Basis"> + <argument index="0" name="x_axis" type="Vector3"> + </argument> + <argument index="1" name="y_axis" type="Vector3"> + </argument> + <argument index="2" name="z_axis" type="Vector3"> + </argument> + <argument index="3" name="origin" type="Vector3"> </argument> <description> - Constructs the Transform from a [Basis]. The origin will be Vector3(0, 0, 0). + Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="affine_inverse"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 66adeab3a6..af67ad2bd4 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -17,6 +17,22 @@ <method name="Transform2D"> <return type="Transform2D"> </return> + <description> + Constructs a default-initialized [Transform] set to [constant IDENTITY]. + </description> + </method> + <method name="Transform2D"> + <return type="Transform2D"> + </return> + <argument index="0" name="from" type="Transform2D"> + </argument> + <description> + Constructs a [Transform2D] as a copy of the given [Transform2D]. + </description> + </method> + <method name="Transform2D"> + <return type="Transform2D"> + </return> <argument index="0" name="rotation" type="float"> </argument> <argument index="1" name="position" type="Vector2"> @@ -38,15 +54,6 @@ Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors). </description> </method> - <method name="Transform2D"> - <return type="Transform2D"> - </return> - <argument index="0" name="from" type="Transform"> - </argument> - <description> - Constructs the transform from a 3D [Transform]. - </description> - </method> <method name="affine_inverse"> <return type="Transform2D"> </return> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 231e0ed06a..da1526df52 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -20,6 +20,22 @@ <method name="Vector2"> <return type="Vector2"> </return> + <description> + Constructs a default-initialized [Vector2] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector2"> + <return type="Vector2"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <description> + Constructs a [Vector2] as a copy of the given [Vector2]. + </description> + </method> + <method name="Vector2"> + <return type="Vector2"> + </return> <argument index="0" name="from" type="Vector2i"> </argument> <description> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 75ddc46dab..e5b85dff9e 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -17,12 +17,17 @@ <method name="Vector2i"> <return type="Vector2i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <description> + Constructs a default-initialized [Vector2i] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="from" type="Vector2i"> </argument> <description> - Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + Constructs a [Vector2i] as a copy of the given [Vector2i]. </description> </method> <method name="Vector2i"> @@ -34,6 +39,17 @@ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. </description> </method> + <method name="Vector2i"> + <return type="Vector2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> + Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + </description> + </method> <method name="abs"> <return type="Vector2i"> </return> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 7e47f768b4..356c9501e1 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -20,6 +20,22 @@ <method name="Vector3"> <return type="Vector3"> </return> + <description> + Constructs a default-initialized [Vector3] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector3"> + <return type="Vector3"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <description> + Constructs a [Vector3] as a copy of the given [Vector3]. + </description> + </method> + <method name="Vector3"> + <return type="Vector3"> + </return> <argument index="0" name="from" type="Vector3i"> </argument> <description> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 45e237fb23..761bddaeef 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -17,14 +17,17 @@ <method name="Vector3i"> <return type="Vector3i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="z" type="int"> + <description> + Constructs a default-initialized [Vector3i] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="from" type="Vector3i"> </argument> <description> - Returns a [Vector3i] with the given components. + Constructs a [Vector3i] as a copy of the given [Vector3i]. </description> </method> <method name="Vector3i"> @@ -36,6 +39,19 @@ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. </description> </method> + <method name="Vector3i"> + <return type="Vector3i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="z" type="int"> + </argument> + <description> + Returns a [Vector3i] with the given components. + </description> + </method> <method name="abs"> <return type="Vector3i"> </return> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index ce4d000a9b..e9f4c2ecf4 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -94,10 +94,17 @@ <method name="bool"> <return type="bool"> </return> - <argument index="0" name="from" type="int"> + <description> + Constructs a default-initialized [bool] set to [code]false[/code]. + </description> + </method> + <method name="bool"> + <return type="bool"> + </return> + <argument index="0" name="from" type="bool"> </argument> <description> - Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. + Constructs a [bool] as a copy of the given [bool]. </description> </method> <method name="bool"> @@ -112,11 +119,10 @@ <method name="bool"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="int"> </argument> <description> - Cast a [String] value to a boolean value, this method will return [code]false[/code] if [code]""[/code] is passed in, and [code]true[/code] for all non-empty strings. - Examples: [code]bool("False")[/code] returns [code]true[/code], [code]bool("")[/code] returns [code]false[/code]. + Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. </description> </method> </methods> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 16a696f959..8153d62bc9 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -12,28 +12,35 @@ <method name="float"> <return type="float"> </return> - <argument index="0" name="from" type="bool"> + <description> + Constructs a default-initialized [float] set to [code]0.0[/code]. + </description> + </method> + <method name="float"> + <return type="float"> + </return> + <argument index="0" name="from" type="float"> </argument> <description> - Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. + Constructs a [float] as a copy of the given [float]. </description> </method> <method name="float"> <return type="float"> </return> - <argument index="0" name="from" type="int"> + <argument index="0" name="from" type="bool"> </argument> <description> - Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to 1.0. + Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. </description> </method> <method name="float"> <return type="float"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="int"> </argument> <description> - Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0. + Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code]. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 2c9f0ad371..27d873831b 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -26,28 +26,35 @@ <method name="int"> <return type="int"> </return> - <argument index="0" name="from" type="bool"> + <description> + Constructs a default-initialized [int] set to [code]0[/code]. + </description> + </method> + <method name="int"> + <return type="int"> + </return> + <argument index="0" name="from" type="int"> </argument> <description> - Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. + Constructs an [int] as a copy of the given [int]. </description> </method> <method name="int"> <return type="int"> </return> - <argument index="0" name="from" type="float"> + <argument index="0" name="from" type="bool"> </argument> <description> - Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. + Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. </description> </method> <method name="int"> <return type="int"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="from" type="float"> </argument> <description> - Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13. + Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. </description> </method> </methods> |