summaryrefslogtreecommitdiff
path: root/doc/classes/float.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/float.xml')
-rw-r--r--doc/classes/float.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 85fe31eec8..11f6d91b05 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -49,6 +49,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if two floats are different from each other.
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -57,6 +58,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the integer has different value than the float.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -65,6 +67,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Multiplies two [float]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -73,6 +76,10 @@
<argument index="0" name="right" type="Vector2">
</argument>
<description>
+ Multiplies each component of the [Vector2] by the given [float].
+ [codeblock]
+ print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -81,6 +88,10 @@
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
+ Multiplies each component of the [Vector2i] by the given [float].
+ [codeblock]
+ print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -89,6 +100,7 @@
<argument index="0" name="right" type="Vector3">
</argument>
<description>
+ Multiplies each component of the [Vector3] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -97,6 +109,7 @@
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
+ Multiplies each component of the [Vector3i] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -105,6 +118,7 @@
<argument index="0" name="right" type="Quat">
</argument>
<description>
+ Multiplies each component of the [Quat] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -113,6 +127,10 @@
<argument index="0" name="right" type="Color">
</argument>
<description>
+ 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]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -121,12 +139,17 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Multiplies a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator +" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary plus operator. Doesn't have any effect.
+ [codeblock]
+ var a = +2.5 # a is 2.5.
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -135,6 +158,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Adds two floats.
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -143,12 +167,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Adds a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary minus operator. Negates the number.
+ [codeblock]
+ var a = -2.5 # a is -2.5.
+ print(-a) # 2.5
+ [/codeblock]
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -157,6 +187,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Subtracts a float from a float.
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -165,6 +196,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Subtracts an [int] from a [float]. The result is a [float].
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -173,6 +205,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Divides two floats.
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -181,6 +214,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Divides a [float] by an [int]. The result is a [float].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -189,6 +223,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is less than the right one.
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -197,6 +232,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than the given [int].
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -205,6 +241,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -213,6 +250,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than or equal to the given [int].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -221,6 +259,8 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if both floats are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -229,6 +269,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the [float] and the given [int] are equal.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -237,6 +278,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than the right one.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -245,6 +287,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than the given [int].
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -253,6 +296,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than or equal to the right one.
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -261,6 +305,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
</method>
</methods>