Return to Snippet

Revision: 5759
at April 2, 2008 05:22 by Wiederkehr


Updated Code
public function getRandom(_min, _max):Number{
	var tNumber:Number;
	tNumber = Math.round(Math.random()*(_max-_min))+_min;
	return tNumber;
} // END getRandom()

Revision: 5758
at April 2, 2008 05:21 by Wiederkehr


Initial Code
public function getRandom(_min, _max):Number{
			var tNumber:Number;
			tNumber = Math.round(Math.random()*(_max-_min))+_min;
			return tNumber;
		} // END getRandom()

Initial URL

                                

Initial Description
Small function that returns a random rounded value between two given numbers.

Initial Title
Function: Random value between two numbers

Initial Tags
actionscript, function

Initial Language
ActionScript