mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Sync classref with 2.0 branch
This commit is contained in:
@@ -11,7 +11,7 @@ float
|
||||
Brief Description
|
||||
-----------------
|
||||
|
||||
|
||||
Float built-in type
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
@@ -24,6 +24,11 @@ Member Functions
|
||||
| :ref:`float<class_float>` | :ref:`float<class_float_float>` **(** :ref:`String<class_string>` from **)** |
|
||||
+----------------------------+--------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Float built-in type.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
|
||||
@@ -31,12 +36,18 @@ Member Function Description
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`bool<class_bool>` from **)**
|
||||
|
||||
Cast a :ref:`bool<class_bool>` value to a floating point value, ``float(true)`` will be equals to 1.0 and ``float(false)`` will be equals to 0.0.
|
||||
|
||||
.. _class_float_float:
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`int<class_int>` from **)**
|
||||
|
||||
Cast an :ref:`int<class_int>` value to a floating point value, ``float(1)`` will be equals to 1.0.
|
||||
|
||||
.. _class_float_float:
|
||||
|
||||
- :ref:`float<class_float>` **float** **(** :ref:`String<class_string>` from **)**
|
||||
|
||||
Cast a :ref:`String<class_string>` value to a floating point value. This method accepts float value strings like `` '1.23' `` and exponential notation strings for its parameter so calling `` float('1e3') `` will return 1000.0 and calling `` float('1e-3') `` will return -0.001.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user