We Recommend

Introduction to Programming using SML Introduction to Programming using SML
Provides a thorough introduction to the principles of programming and program design using the Standard ML programming language. Emphasis is putting the theory of programming into practice.


Posted By

ypmits on 08/13/06


Tagged

number textmate actionscript random


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

jitendramr
horizens
chrisaiv
johng


getRandomNumber


Published in: ActionScript 


This will return a random number between two given numbers.


  1. public function getRandomNumber(minNum:Number,maxNum:Number):Number{
  2. return(minNum+Math.floor(Math.random()*(maxNum+1-minNum)));
  3. };

Report this snippet 

You need to login to post a comment.