4 ms·
INT(RND(1)+15) will always return 15 and nothing else, since the expected output would be a rounded-down integer value of (a random number between 0 and 0.99999
by jamesbrownuhh 13y ago
INT(RND(1)+15) will always return 15 and nothing else, since the expected output would be a rounded-down integer value of (a random number between 0 and 0.99999999etc999, plus 15).
INT(RND(1) * 15), in contrast will produce a random whole number from 0 to 14. Hence the popular use of, for example, INT(RND(1) * 6)+1 in any given situation where a random number between 1 and 6 is required.
- acegopher 13y agoCorrect... my mistake, I put "+" when the original code was "*".