无涯教程-Math.acos(x)函数

29 阅读1分钟

此函数返回x的反余弦值。

Math.acos(x) - 语法

Math.acos(x)      
  • x   -  代表数字

Math.acos(x) - 示例

console.log("---Math.acos()---") 
console.log("Math.acos(0): "+Math.acos(0)) 
console.log("Math.acos(Math.SQRT1_2): "+Math.acos(Math.SQRT1_2))          

运行上面代码输出

---Math.acos()--- 
Math.acos(0): 1.5707963267948966 
Math.acos(Math.SQRT1_2): 0.7853981633974483       

参考链接

www.learnfk.com/es6/es6-mat…