W3cubDocs

/Pony

Random package

The Random package provides support generating random numbers. The package provides random number generators you can use in your code, a dice roller and a trait for implementing your own random number generator.

If your application does not require a specific generator, use Rand.

Seed values can contain up to 128 bits of randomness in the form of two U64s. A common non-cryptographically secure way to seed a generator is with Time.now.

let rand = Rand
let n = rand.next()

Public Types

© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/random--index