Subtractive generator: Difference between revisions
Content added Content deleted
(Added Kotlin) |
m (→{{header|Kotlin}}: Replaced tab with spaces) |
||
Line 1,051: | Line 1,051: | ||
if (si == sj) subrandSeed(0) |
if (si == sj) subrandSeed(0) |
||
if (si-- == 0) si = 54 |
if (si-- == 0) si = 54 |
||
if (sj-- == 0) sj = 54 |
|||
var x = state[si] - state[sj] |
var x = state[si] - state[sj] |
||
if (x < 0) x += MOD |
if (x < 0) x += MOD |