Spec-Zone.ru › 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

  • class XorShift128Plus
  • class XorOshiro128Plus
  • class XorOshiro128StarStar
  • class SplitMix64
  • type Rand
  • trait Random
  • class MT
  • class Dice

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API