数学对象
来源:互联网 发布:js调用麦克风录音 编辑:程序博客网 时间:2024/05/28 06:07
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script>
//获取圆周率
//alert(Math.PI);
//获取随机数
//document.write(Math.random()+"<br/>");
//获取5—12之间的随机数
//document.write(5+Math.random()*7+"<br/>");
//document.write(5+Math.random()*7+"<br/>");
//document.write(5+Math.random()*7+"<br/>");
//document.write(parseInt(5+Math.random()*7)+"<br/>");
//document.write(parseInt(5+Math.random()*7)+"<br/>");
//m-n之间的随机数
//Math.random()*(n-m)+m
//abs()取绝对值
//document.write(Math.abs(-100));
//ceil(数值) 大于或等于该数的最小整数(向上取整法)
//document.write(Math.ceil(4.001)); //5
//document.write(Math.ceil(-4.001));//5
//floor(数值) 小于或等于该数的最大整数(向下取整法)
//document.write(Math.floor(4.001)); //4
//document.write(Math.floor(-4.001)); //-5
//min(数值1,数值2) 返回最小值
//document.write(Math.min(45,89)); //45
//max(数值1,数值2) 返回最大值
//document.write(Math.max(45,89)); //89
//pow(数值1,数值2) 返回数值1的数值2次方
//document.write(Math.pow(3,2)); //9
//round(数值) 四舍五入
//document.write(Math.round(7.80943)); //8
//sqrt(数值) 开平方根
//document.write(Math.sqrt(16)); //4
</script>
</head>
<body>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script>
//获取圆周率
//alert(Math.PI);
//获取随机数
//document.write(Math.random()+"<br/>");
//获取5—12之间的随机数
//document.write(5+Math.random()*7+"<br/>");
//document.write(5+Math.random()*7+"<br/>");
//document.write(5+Math.random()*7+"<br/>");
//document.write(parseInt(5+Math.random()*7)+"<br/>");
//document.write(parseInt(5+Math.random()*7)+"<br/>");
//m-n之间的随机数
//Math.random()*(n-m)+m
//abs()取绝对值
//document.write(Math.abs(-100));
//ceil(数值) 大于或等于该数的最小整数(向上取整法)
//document.write(Math.ceil(4.001)); //5
//document.write(Math.ceil(-4.001));//5
//floor(数值) 小于或等于该数的最大整数(向下取整法)
//document.write(Math.floor(4.001)); //4
//document.write(Math.floor(-4.001)); //-5
//min(数值1,数值2) 返回最小值
//document.write(Math.min(45,89)); //45
//max(数值1,数值2) 返回最大值
//document.write(Math.max(45,89)); //89
//pow(数值1,数值2) 返回数值1的数值2次方
//document.write(Math.pow(3,2)); //9
//round(数值) 四舍五入
//document.write(Math.round(7.80943)); //8
//sqrt(数值) 开平方根
//document.write(Math.sqrt(16)); //4
</script>
</head>
<body>
</body>
</html>
0 0
- 数学对象
- 数学对象
- 大学数学研究对象
- Math(数学对象)
- 使用数学运算(数学对象)
- Number对象、Math数学对象、数组对象
- JavaScript Math (数学对象)
- 学习笔记:javascript内置对象:数学对象
- JavaScript中的数学运算Math对象
- 2 - Python数学函数、字符串、对象
- JavaScript对象之数学函数运算-Math
- Javaweb中JavaScript的Math数学对象
- JavaScript字符串+常用的数学对象
- 【Python】数学函数、字符串和对象07
- 数学
- 数学
- 数学
- 数学
- Intent PendingIntent
- Solr Grouping / Field Collapsing(分组查询)
- ubuntu下vsftpd配置详细篇
- 零基础入门学习Python(2):字符串输出
- Avro技术应用_8. 混合模式 - MR 输入/出文件为 Avro类型 -- 待完善
- 数学对象
- linux下安装vsftp
- CButton类控件的使用
- Fragment简单的创建与使用
- LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- hbase 基本命令
- C# WPF 制作的计算器,有运算优先级
- 系统操作日志设计
- Liunx 用户权限管理