Skip to content

science.random.wren

clsource edited this page Oct 14, 2020 · 1 revision

A class that helps with pseudo random number generation

API

This is a function for generating entropy. Based on Mattasher/probability-distributions.

  • Since: 1.0.0
  • Signature: static func prng(len:Num? = 16, seed:Random? = Random.new()) -> Num
  • Parameter len: number divisions of the entropy
  • Parameter seed: an instance of Random.new() with a seed to generate entropy
  • Returns: A pseduo random number between 0 and 1

The seed is a new instance of Random.new(). Here for convenience.

  • Since: 1.0.0
  • Signature: static func seed(value: String?) -> Random
  • Parameter value: An optional value used to generate a new instance of Random.new().