sim.getRandom

Generates a random value in the range between 0.0 and 1.0. The value is generated from an individual generator attached to the calling script

Synopsis

float randomValue = sim.getRandom(int seed = None) float randomValue = sim.getRandom(int seed = nil)

Arguments

  • seed: an optional number that can be used to seed/reseed the random number generator. Leave empty or set to None/nil if the generator should not be reseeded.

Return values

  • randomValue: a random number in the range of 0.0 and 1.0