Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Making random not so random Reply To: Making random not so random

#192068
LrnWdlr
Participant

@Shikkediel

Thanks for taking the time to look into it!

Can you briefly explain to me how those ‘randomizers’ account to window dimensions? That’s what I need, but I just don’t understand it.

As far as them not being evenly spread out on purpose, that might even be true… I don’t really understand how the script works, so I’m not gonna dispute that.

The issue is that with the current random function I have that will never happen, regardless of the amount of items I have…

What I’m trying to accomplish is force the ‘randomizer’ to always spread out the items across, let’s say, 80% of the window’s width… so that something like this http://i.imgur.com/ZLQYZIu.png (photoshopped!) would never happen!

Your fiddle, is clearly a better version than what I had.
If I were able to understand it I could fine tune it to perfection.

Thanks a lot.