Using Random#low(), Random#mid() and Random#high()



  • The API Documentation does not specify what the exact meaning is of those three random functions.
    When should a scripter/developer use one over the other?


  • Script Writer

    low, mid and high refer the the range. Say you call Random.low(500, 1000), the number returned will be closer to 500 because you called low, if you called mid then the number would be closer to 750, and high would be closer to 1000. You can test this by calling Log.info(Random.low(500,1000));


 

87
Online

11.2k
Users

1.1k
Topics

14.6k
Posts