lowest random number possible

Game Editor comments and discussion.

lowest random number possible

Postby jcoggins » Wed Oct 04, 2006 8:29 pm

Is the lowest number possible for the rand() function to generate 0 or 1?

Jason
jcoggins
 
Posts: 18
Joined: Mon May 08, 2006 10:47 pm
Score: 0 Give a positive score

Postby Game A Gogo » Wed Oct 04, 2006 9:16 pm

from what i know, its 0.
if you want it not to change to a zero put
Code: Select all
x=rand(Myvar-1)+1;

that is just an exemple for using whit variable.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest