Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Math
  5. random

random

Platform Compatibility

PC Mac OSX Oculus Quest
X X X

Get a random number, optionally make it a whole number (floored)

Parameters:

  • min
    • A float value
  • max
    • A float value
  • toInt Optional
    • A boolean value

returns a Float (decimal number) value

Example:

1
obj.random(min, max, toInt)
Tags
Was this article helpful to you? Yes No

How can we help?