quote:
Originally posted by CookieRevised
Felu was the first one to post a reply to this thread and which I also quoted in my post. His post was only deleted long after you replied to my post... So you could have seen that.
The "Math.floor((upperbound - lowerbound + 1)..." is also in my original post, clearly visible... You could have seen that too.
You first replied in this thread 6 hours after my last edit of my original reply, so don't say you missed something because it wasn't there or because I edited in afterwards
lol you're right, it's in the quote part
I guess it's just that I would have repeated it just before working it out to make clear why there is a pointless addition and subtraction in one line of code. Just like you did in the other post:
quote:
Originally posted by CookieRevised
[b]it should be
Math.floor((upperbound - lowerbound + 1) * Math.random() + lowerbound);
thus
Math.floor((100 - 1 + 1) * Math.random() + 1);
thus
Math.floor(Math.random() * 100 + 1);
I just noticed it looked weird and didn't immediately see why you used it, that's all