mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Sync classref with current source
This commit is contained in:
@@ -58,10 +58,14 @@ Method Descriptions
|
||||
|
||||
Cast a :ref:`bool<class_bool>` value to an integer value, ``int(true)`` will be equals to 1 and ``int(false)`` will be equals to 0.
|
||||
|
||||
----
|
||||
|
||||
- :ref:`int<class_int>` **int** **(** :ref:`float<class_float>` from **)**
|
||||
|
||||
Cast a float value to an integer value, this method simply removes the number fractions, so for example ``int(2.7)`` will be equals to 2, ``int(.1)`` will be equals to 0 and ``int(-2.7)`` will be equals to -2.
|
||||
|
||||
----
|
||||
|
||||
- :ref:`int<class_int>` **int** **(** :ref:`String<class_String>` from **)**
|
||||
|
||||
Cast a :ref:`String<class_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 ``'1.7'``. This method will ignore all non-number characters, so calling ``int('1e3')`` will return 13.
|
||||
|
||||
Reference in New Issue
Block a user