LOG IN SIGN UP
Documentation

randomint_seeded()

Identical to randomint, except takes an additional parameter used to seed the random number generator.

This does not use secure random numbers and should not be used for cryptographic purposes.

Format

BOOL
randomint_seeded(INTEGER from, INTEGER to, INTEGER seed)

Examples

if (randomint_seeded(1, 5, user_id) < 5) {
  set req.http.X-ABTest = "A";
} else {
  set req.http.X-ABTest = "B";
}
if (randomint_seeded(-1, 0, 555) == -1) {
  set req.http.X-ABTest = "A";
} else {
  set req.http.X-ABTest = "B";
}