Contents

Roo

Maths.random_int()

Generates a random integer constrained to within two integers.

Maths.random_int(min as Number, max as Number) as Number

Parameters

  • min: Integer. The lowest value that should be returned
  • max: Integer. The highest value that should be returned

Returns

  • Integer Number object.

Example

Maths.random_int(1, 5) # => 3 (will differ)