|
|
On 1/31/2016 11:27 PM, Sven Littkowski wrote:
> Yes, there are two functions to convert a float to a close-by integer:
>
> 1. Floor
> If the float is, let's say, "11.4676475" (could be a multiplication of a
> "rand" random result), floor returns "11" (the next integer BELOW that
> float).
>
> 2. Ceil(ing)
> If the float is, let's say, "11.4676475" (could be a multiplication of a
> "rand" random result), floor returns "12" (the next integer ABOVE that
> float).
>
There is also int, which varies depending on if the number is greater or
less than zero.
Post a reply to this message
|
|