ES6 - Math-PI 属性

圆的周长与其直径的比率,约为 3.14159。

语法

Math.PI

示例

console.log(Math.PI)
// 圆的周长与其直径的比率:~3.142      

输出

3.141592653589793