• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] random numbers in java...?

This topic is 6196 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
actually, i don''t think it reaches 1.0.
for example, if u want a random number between 1 and 5, you would do
Math.random()*5 + 1

min is 0.0*5 + 1 = 1
max is .999*5 + 1 = 5.995

Share this post


Link to post
Share on other sites
Thanks a lot guys. It was so simply I feel stupid, but often times feeling stupid is part of learning...! ...right?!?

Briar->LoDeran();

Share this post


Link to post
Share on other sites

  • Advertisement