Simple RNG by Bob Jenkins:
http://burtleburtle.net/bob/rand/smallprng.html
Attributes
- Companion
- object
- Source
- Seed.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Generates a Double value.
Generates a Double value.
The values will be uniformly distributed, and will be contained in the interval [0.0, 1.0).
Attributes
- Source
- Seed.scala
Generates a Long value.
Generate the next seed in the RNG's sequence.
Reseed the RNG using the given Long value.
This is a quick way of deterministically sliding this RNG to a different part of the PRNG sequence.
This is a quick way of deterministically sliding this RNG to a different part of the PRNG sequence.
We use this as an easy way to "split" the RNG off into a new part of the sequence. We want to do this in situations where we've already called .next several times, and we want to avoid repeating those numbers while preserving determinism.
Attributes
- Source
- Seed.scala
Generate a Base-64 representation of this seed.
Generate a Base-64 representation of this seed.
Given a seed, this method will return a String with 44 characters, according to the web-safe Base-64 specification (i.e. using minus (-) and underscore (_) in addition to alphanumeric characters).
The 256-bit seed is serialized as a little-endian array of 64-bit Long values. Strings produced by this method are guaranteed to be parseable by the Seed.fromBase64 method.
Attributes
- Source
- Seed.scala