一、公式
公式为
二、使用JS实现该公式方法
function countSize(r, n) {
return (n / 2) * Math.pow(r, 2) * Math.sin((2 * Math.PI) / n)
}
console.log(countSize(10, 3)); // 129.9038105676658
结束
公式为
function countSize(r, n) {
return (n / 2) * Math.pow(r, 2) * Math.sin((2 * Math.PI) / n)
}
console.log(countSize(10, 3)); // 129.9038105676658
结束