AS3 ランダム 数値 メモ

var ItemNum:Number = Math.floor(Math.random() * 14) +1; //1~14

0~550の範囲のランダム値は
Math.random()  * 550
となり

-10~10までの範囲のランダム値は
Math.floor(Math.random() * 21) -10
となる

ランダム値が0なら-10
1なら約21(20.9999999)で小数点切捨てで20-10となる

Math.floor(Math.random() * 301) +50; //50~350
Math.floor(Math.random() * 201) +50; //50~250