Javascript Math.asin()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:0
此方法返回弧度数字的反正弦。asin方法返回-1到1 ,x-pi/2和pi/2弧度之间的数值。如果数的值超出这个范围,则返回nan。
语法
math.asin( x ) ;
下面是参数的详细信息:
返回值:
返回弧度数字的反正弦。
例子:
<html>
<head>
<title>javascript math asin() method</title>
</head>
<body>
<script type="text/javascript">
var value = math.asin(-1);
document.write("first test value : " + value );
var value = math.asin(null);
document.write("<br />second test value : " + value );
var value = math.asin(30);
document.write("<br />third test value : " + value );
var value = math.asin("string");
document.write("<br />fourth test value : " + value );
</script>
</body>
</html>
这将产生以下结果:
first test value : -1.5707963267948965
second test value : 0
third test value : nan
fourth test value : nan