Return to Snippet

Revision: 55333
at February 3, 2012 01:55 by GeorgeCross

Initial Code
public function getRandInt(_min:Number, _max:Number):int
  return _min + Math.round(Math.random()*(_max - _min));

public function getRandNum(_min:Number, _max:Number):Number
  return _min +Math.random()*(_max - _min);

Initial URL

Initial Description
Functions that returns a number between min & max, as integer or decimal.

Initial Title
Random Number Between Max and Min

Initial Tags

Initial Language
ActionScript 3