基本的Random函数
摘要:
Random函数 Math.random(); 可以产生出0-1之间的任意小数,例如0.0105901374530933 或 0.872525005541986,有几个其他的函数可以用来改变产生的数字,从而可以更好的在你的影片中使用: Math.round(); Math.ceil(); Math.floor(); 这几个函数都是用来取得整数的,Math.round();是采用四舍五入方式取得最接近的整 数。Math.ceil();是向上取得一个最接近的整数。Math.floor(); 和Math.ceil();相反,Math.floor();向下取得一个最接近的整数... 阅读全文
posted @ 2012-04-18 17:13
爱直至成伤lie
阅读(488)
评论(0)
推荐(0)
浙公网安备 33010602011771号