学习笔记:学习Javascript的Math对象

废话少说,看结果:

Math.ceil(0)=0
Math.ceil(
0.1)=1
Math.ceil(
-0.9)=0

Math.floor(
0)=0
Math.floor(
0.1)=0
Math.floor(
-0.9)=-1

Math.min(
1,-1)=-1
Math.max(
1,-1)=1

Math.pow(
2,-3)=0.125

Math.random()
=0.5470700571418643

Math.round(
4)=4
Math.round(
4.4999)=4
Math.round(
4.5001)=5
Math.round(
-4)=-4
Math.round(
-4.4999)=-4
Math.round(
-4.5001)=-5

posted on 2007-04-07 12:02 PeakGao 阅读(294) 评论(0)  编辑 收藏 引用 所属分类: Javascript

<2007年5月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

导航

统计

常用链接

留言簿(9)

随笔分类(67)

随笔档案(65)

搜索

最新评论

阅读排行榜

评论排行榜