javascript 中 Math.asinh() 和 Math.acosh() 函数有什么用?
javascriptobject oriented programmingfront end technology更新于 2025/9/19 9:16:17
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
相关文章
有用资源
javascript 参考教程 - 该教程包含有关 javascript 的更多信息:https://www.cainiaomax.com/javascript/

