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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.