Skip to main content

Mojo function

seed

seed()

Seeds the random number generator using a time-based value.

Example:

from std.random import seed

seed()

seed(a: Int)

Seeds the random number generator using the value provided.

Example:

from std.random import seed

seed(123456)

Args:

  • a (Int): The seed value to initialize the PRNG state.

Was this page helpful?