Merge pull request #34074 from Calinou/doc-floor-int

Mention that `int()` can be used as an alternative to `floor()`
This commit is contained in:
Rémi Verschelde 2019-12-03 09:45:28 +01:00 committed by GitHub
commit 54af9cd470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -336,11 +336,12 @@
<description>
Rounds [code]s[/code] to the closest smaller integer and returns it.
[codeblock]
# a is 2
# a is 2.0
a = floor(2.99)
# a is -3
# a is -3.0
a = floor(-2.99)
[/codeblock]
[b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(s)[/code] directly.
</description>
</method>
<method name="fmod">