Jump to content

Random Generator


SyntaxPro

Recommended Posts

Is it just me or does calling the Math.random() function fail?

 

I was doing Math.floor(Math.random() * 100) + 1, but even still it seems like because im calling it so close to each other they're so close...

 

Example (it seems like)

 

a = Math.floor(Math.random() * 100) + 1; would be like 2

b = Math.floor(Math.random() * 100) + 1; would be like 45

c = Math.floor(Math.random() * 100) + 1; would be like 89

 

see how it gets higher as u go down the row? it seems to do that a lot... anyone know why?

Link to comment
https://forums.phpfreaks.com/topic/220272-random-generator/#findComment-1141512
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.