Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Returns a random number between min (inclusive) and max (exclusive)
- function getRandom(min:Number, max:Number):Number {
- return Math.random() * (max - min) + min;
- }
- //Returns a random integer between min (inclusive) and max (inclusive)
- function getRandomInt(min, max):int {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement