主题:  why the random functions ???

东方楚楚

职务:普通成员
等级:1
金币:0.0
发贴:44
注册:2000/10/25 1:32:58
#12002/3/11 11:42:12
Objects -> Core -> Math -> Methods -> random

but:

Deprecated -> Functions -> random

why why why ???



turbine

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2002/2/4 18:04:01
#22002/3/11 11:53:56
不一样地~
function randon:random(num)/*0~num-1的随机整数*/
Math.random()/*0~1的随机浮点数*/



东方楚楚

职务:普通成员
等级:1
金币:0.0
发贴:44
注册:2000/10/25 1:32:58
#32002/3/11 14:46:31
I see...

Actions:
a = Math.random();
trace(a);
b = random(10);
trace(b);

Output:
0.318177967797965
4

thank you very much !



Demon.S

职务:版主
等级:5
金币:10.0
发贴:2468
注册:2000/9/15 13:56:49
#42002/3/11 15:56:59
random是math.random的一种应用。