Math对象的asinh()函数接受一个数字,并以弧度返回其双曲线反正弦值。要将结果值转换为度数,请将其乘以180,然后将结果除以3.14159(pi值)。
它的语法如下
Math.asinh(0.5)
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result = Math.asinh(90); document.write("Hyperbolic arcsine value: "+result); document.write("<br>"); document.write("Hyperbolic arcsine value in degrees: "+result*180/Math.PI); </script> </body> </html>
输出结果
Hyperbolic arcsine value: 5.192987713658941 Hyperbolic arcsine value in degrees: 297.53627905594817