ES6 - Math.tan(x) 函数
此函数返回 x 的正切。
语法
Math.tan(x)
参数
X − 代表一个数字
示例
console.log("---Math.tan()---") console.log("Math.tan(Math.PI/4): "+Math.tan(Math.PI/4)) console.log("Math.tan(0): "+Math.tan(0))
输出
---Math.tan()--- Math.tan(Math.PI/4): 0.9999999999999999 Math.tan(0): 0