Help for this page

Select Code to Download


  1. or download this
    $result = ($prime_number * $input + $seed) % $max;
    
  2. or download this
    shuffle(5,10,0) == (7 * 0 + 5) % 10 == 5 % 10 == 5
    shuffle(5,10,1) == (7 * 1 + 5) % 10 == 12 % 10 == 2
    ...
    shuffle(5,10,7) == (7 * 7 + 5) % 10 == 54 % 10 == 4
    shuffle(5,10,8) == (7 * 8 + 5) % 10 == 61 % 10 == 1
    shuffle(5,10,9) == (7 * 9 + 5) % 10 == 68 % 10 == 8