Method: \saffire\math.seed()

Signature void math.seed(numerical seed);

Seeds the PRNG of Saffire. Using the same seed will result in generated the same random numbers (considering using the same from and to values).

Arguments

Notes:

Note that the seed can result in different random numbers on different Saffire versions (and even computers).

Examples:

import io, math;

math.seed(10);
io.println(math.random(1, 100));
io.println(math.random(1, 100));
io.println(math.random(1, 100));

math.seed(10);
io.println(math.random(1, 100));
io.println(math.random(1, 100));
io.println(math.random(1, 100));

// 96
// 9
// 79

// 96
// 9
// 79