Darwinbots Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New Installer for Dawinbots 2 Released.
Home
Help
Search
Members
View the memberlist
Search For Members
Login
Register
Darwinbots Forum
»
Bots and Simulations
»
DNA - General
»
RND Question
« previous
next »
Print
Pages: [
1
]
Author
Topic: RND Question (Read 3710 times)
Boris of Quirm
Bot Neophyte
Posts: 45
RND Question
«
on:
November 25, 2005, 05:41:58 PM »
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.
Logged
Why do computer programmers celebrate Christmas at Halloween?
Because Dec 25 is equal to Oct 31!!
Boris of Quirm
Bot Neophyte
Posts: 45
RND Question
«
Reply #1 on:
November 25, 2005, 05:54:48 PM »
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.
Logged
Why do computer programmers celebrate Christmas at Halloween?
Because Dec 25 is equal to Oct 31!!
Numsgil
Administrator
Bot God
Posts: 7742
RND Question
«
Reply #2 on:
November 25, 2005, 05:56:50 PM »
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.
Logged
Print
Pages: [
1
]
« previous
next »
Darwinbots Forum
»
Bots and Simulations
»
DNA - General
»
RND Question