diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-15 22:29:55 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-15 22:29:55 +0100 |
commit | cfb9cae23a50554872ae49b6a2aec8855b294eb9 (patch) | |
tree | 6c6b45fd0bf11bcef129149b2a46094febb56821 /doc/classes | |
parent | d0025a1f02124b7425834a436a81a9c70a6f1eb2 (diff) | |
parent | a43319b6c9c24ed9b88af336c74a4d60e76b6fc3 (diff) |
Merge pull request #62814 from KoBeWi/strint
Restore numeric from String constructors
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/float.xml | 7 | ||||
-rw-r--r-- | doc/classes/int.xml | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/classes/float.xml b/doc/classes/float.xml index e3938fb5d5..a196021249 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -28,6 +28,13 @@ </constructor> <constructor name="float"> <return type="float" /> + <param index="0" name="from" type="String" /> + <description> + Converts a [String] to a [float], following the same rules as [method String.to_float]. + </description> + </constructor> + <constructor name="float"> + <return type="float" /> <param index="0" name="from" type="bool" /> <description> 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. diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 65ab5d4656..93fc8386c6 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -54,6 +54,13 @@ </constructor> <constructor name="int"> <return type="int" /> + <param index="0" name="from" type="String" /> + <description> + Converts a [String] to an [int], following the same rules as [method String.to_int]. + </description> + </constructor> + <constructor name="int"> + <return type="int" /> <param index="0" name="from" type="bool" /> <description> Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. |