Bots and Simulations > DNA - General
RND Question
(1/1)
Boris of Quirm:
Sorry to sound a thickie, but can someone confirm the following:-
If I use 3 RND, I should expect a result of 1, 2 or 3.
A decimal isn't returned, nor is 0.
The reason I ask is because some languages can include 0 as an option.
Boris of Quirm:
Don't worry problem solved.
An integer is returned and the value can include 0.
So 3 RND will produce 0, 1, 2 and 3.
Numsgil:
I believe value rnd will produce a value in the interval [0, value]
This may also work for negative values, but I haven't tried it yet.
Navigation
[0] Message Index
Go to full version