ES6——Math.acos(x) 函式



此函式返回 x 的反餘弦。

語法

Math.acos(x)      

引數

  • 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       
廣告
© . All rights reserved.