Tag: randomness

  • Javascript’s Math.random() – when random isn’t random

    Yesterday I wrote a function in Javascript that should return random integers in a given range; basically just the same as the PHP function rand($min, $max). But after a few test runs I noticed that the numbers were not quite as random as they should be; some of them appeared more often than expected, others…