Skip to content

Random Generation

Narrat has a few commands to generate numbers or choose random elements

  • random [min] [max]: Returns an integer between [min] and [max] (inclusive)
  • random_float [min] [max]: Returns a random float between [min] and [max]
  • random_from_args [arg1] [arg2] [arg3] ...: Returns a random element from the args passed. Args can be any value. Useful to select a random element from a list of possibilities

Released under the MIT License.