diff --git a/core/doc_data.h b/core/doc_data.h index c75cdfcde5b..066cc6b848e 100644 --- a/core/doc_data.h +++ b/core/doc_data.h @@ -70,18 +70,29 @@ public: Vector errors_returned; bool operator<(const MethodDoc &p_method) const { if (name == p_method.name) { - // Must be a constructor since there is no overloading. - // We want this arbitrary order for a class "Foo": - // - 1. Default constructor: Foo() - // - 2. Copy constructor: Foo(Foo) - // - 3+. Other constructors Foo(Bar, ...) based on first argument's name - if (arguments.size() == 0 || p_method.arguments.size() == 0) { // 1. + // Must be an operator or a constructor since there is no other overloading + if (name.left(8) == "operator") { + if (arguments.size() == p_method.arguments.size()) { + if (arguments.size() == 0) { + return false; + } + return arguments[0].type < p_method.arguments[0].type; + } return arguments.size() < p_method.arguments.size(); + } else { + // Must be a constructor + // We want this arbitrary order for a class "Foo": + // - 1. Default constructor: Foo() + // - 2. Copy constructor: Foo(Foo) + // - 3+. Other constructors Foo(Bar, ...) based on first argument's name + if (arguments.size() == 0 || p_method.arguments.size() == 0) { // 1. + return arguments.size() < p_method.arguments.size(); + } + if (arguments[0].type == return_type || p_method.arguments[0].type == p_method.return_type) { // 2. + return (arguments[0].type == return_type) || (p_method.arguments[0].type != p_method.return_type); + } + return arguments[0] < p_method.arguments[0]; } - if (arguments[0].type == return_type || p_method.arguments[0].type == p_method.return_type) { // 2. - return (arguments[0].type == return_type) || (p_method.arguments[0].type != p_method.return_type); - } - return arguments[0] < p_method.arguments[0]; } return name < p_method.name; } diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index be41cdde994..97cbf6918dd 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -224,13 +224,6 @@ Transforms (multiplies) each element of the [Vector2] array by the given [Transform2D] matrix. - - - - - Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). - - @@ -238,6 +231,13 @@ Transforms (multiplies) the [Rect2] by the given [Transform2D] matrix. + + + + + Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). + + diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 511574f6aa5..e62cb9216e7 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -151,6 +151,13 @@ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. + + + + + Transforms (multiplies) the [AABB] by the given [Transform3D] matrix. + + @@ -165,13 +172,6 @@ Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). - - - - - Transforms (multiplies) the [AABB] by the given [Transform3D] matrix. - - diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 595af6222c7..431815e75aa 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -356,6 +356,13 @@ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. + + + + + Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix. + + @@ -366,13 +373,6 @@ [/codeblock] - - - - - Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix. - - diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 62d467c505c..6d20cc85ea7 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -371,16 +371,6 @@ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. - - - - - Multiplies each component of the [Vector3] by the components of the given [Vector3]. - [codeblock] - print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" - [/codeblock] - - @@ -402,6 +392,16 @@ Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix. + + + + + Multiplies each component of the [Vector3] by the components of the given [Vector3]. + [codeblock] + print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" + [/codeblock] + + diff --git a/doc/classes/float.xml b/doc/classes/float.xml index c96360e6ba1..9effe9d5bf7 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -62,10 +62,13 @@ - - + + - Multiplies two [float]s. + Multiplies each component of the [Color] by the given [float]. + [codeblock] + print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) + [/codeblock] @@ -113,13 +116,10 @@ - - + + - Multiplies each component of the [Color] by the given [float]. - [codeblock] - print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) - [/codeblock] + Multiplies two [float]s. diff --git a/doc/classes/int.xml b/doc/classes/int.xml index bb36d837412..d212fe42bfa 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -131,20 +131,6 @@ Multiplies each component of the [Quaternion] by the given [int]. This operation is not meaningful on its own, but it can be used as a part of a larger expression. - - - - - Multiplies two [int]s. - - - - - - - Multiplies an [int] and a [float]. The result is a [float]. - - @@ -176,6 +162,20 @@ Multiplies each component of the [Vector3i] by the given [int]. + + + + + Multiplies an [int] and a [float]. The result is a [float]. + + + + + + + Multiplies two [int]s. + +