javascript 中 Math.asinh() 和 Math.acosh() 函数有什么用?

javascriptobject oriented programmingfront end technology

Math.asinh() Math.acosh() 函数分别用于求一个数的双曲反正弦双曲反余弦。这些函数是 Math静态方法,因此它们总是用作 Math.asinh() Math.acosh(),而不是用作创建的数学对象的方法。

Math.asinh()

此方法用于求一个数的双曲反正弦。它以数字为参数并返回双曲正弦值

示例

<html>
<body>
<script>
document.write(Math.asinh(2));
document.write("</br>");
document.write(Math.asinh(7));
</script>
</body>
</html>

输出

1.4436354751788103
2.644120761058629

Math.acosh()

此方法用于查找数字的双曲反余弦。它以数字为参数并返回双曲余弦值

示例

<html>
<body>
<script>
   document.write(Math.acosh(2));
   document.write("</br>");
   document.write(Math.acosh(7));
</script>
</body>
</html>

输出

1.3169578969248166
2.6339157938496336

相关文章