Mention that int() can be used as an alternative to floor()

This commit is contained in:
Hugo Locurcio 2019-12-03 08:30:49 +01:00
parent 10bae7c05b
commit 1fcdeaee39
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

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">