2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 02:03:48 +01:00
<class name= "float" version= "4.0" >
2017-09-12 22:42:36 +02:00
<brief_description >
2020-01-03 20:48:27 +01:00
Float built-in type.
2017-09-12 22:42:36 +02:00
</brief_description>
<description >
Float built-in type.
</description>
<tutorials >
</tutorials>
<methods >
2020-11-10 14:16:20 +01:00
<method name= "float" qualifiers= "constructor" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2020-11-09 17:46:03 +01:00
<description >
Constructs a default-initialized [float] set to [code]0.0[/code].
</description>
</method>
2020-11-10 14:16:20 +01:00
<method name= "float" qualifiers= "constructor" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "from" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
2020-11-09 17:46:03 +01:00
Constructs a [float] as a copy of the given [float].
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-11-10 14:16:20 +01:00
<method name= "float" qualifiers= "constructor" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "from" type= "bool" />
2017-09-12 22:42:36 +02:00
<description >
2020-11-09 17:46:03 +01:00
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.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-11-10 14:16:20 +01:00
<method name= "float" qualifiers= "constructor" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "from" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2020-11-09 17:46:03 +01:00
Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-11-10 14:16:20 +01:00
<method name= "operator !=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if two floats are different from each other.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator !=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if the integer has different value than the float.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies two [float]s.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
<argument index= "0" name= "right" type= "Vector2" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies each component of the [Vector2] by the given [float].
[codeblock]
print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
[/codeblock]
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2i" />
<argument index= "0" name= "right" type= "Vector2i" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies each component of the [Vector2i] by the given [float].
[codeblock]
print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
[/codeblock]
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
<argument index= "0" name= "right" type= "Vector3" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies each component of the [Vector3] by the given [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3i" />
<argument index= "0" name= "right" type= "Vector3i" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies each component of the [Vector3i] by the given [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Quaternion" />
<argument index= "0" name= "right" type= "Quaternion" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-20 08:02:02 +01:00
Multiplies each component of the [Quaternion] by the given [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "Color" />
<argument index= "0" name= "right" type= "Color" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
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]
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator *" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Multiplies a [float] and an [int]. The result is a [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator +" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Adds two floats.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator +" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Adds a [float] and an [int]. The result is a [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator -" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Subtracts a float from a float.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator -" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Subtracts an [int] from a [float]. The result is a [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator /" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Divides two floats.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator /" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Divides a [float] by an [int]. The result is a [float].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator <" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] the left float is less than the right one.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator <" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if this [float] is less than the given [int].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator <=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] the left integer is less than or equal to the right one.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator <=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if this [float] is less than or equal to the given [int].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator ==" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
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.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator ==" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if the [float] and the given [int] are equal.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator >" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] the left float is greater than the right one.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator >" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if this [float] is greater than the given [int].
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator >=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "float" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] the left float is greater than or equal to the right one.
2020-11-10 14:16:20 +01:00
</description>
</method>
<method name= "operator >=" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "right" type= "int" />
2020-11-10 14:16:20 +01:00
<description >
2021-01-06 01:13:11 +01:00
Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
2020-11-10 14:16:20 +01:00
</description>
</method>
2021-06-19 17:58:49 +02:00
<method name= "operator unary+" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2021-06-19 17:58:49 +02:00
<description >
</description>
</method>
<method name= "operator unary-" qualifiers= "operator" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2021-06-19 17:58:49 +02:00
<description >
</description>
</method>
2017-09-12 22:42:36 +02:00
</methods>
<constants >
</constants>
</class>