Created
July 5, 2011 08:29
-
-
Save mike-neck/1064485 to your computer and use it in GitHub Desktop.
creates random integer between given range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IntRange.metaClass.random = {(new Random()).nextInt(delegate.to - delegate.from + 1) + delegate.from} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment