[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/PI [Back]  [Original]

Math.PI - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Math.PI

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

Math.PI , 3.14159 .

In this article

function calculateCircumference(radius) {
  return 2 * Math.PI * radius;
}

console.log(Math.PI);
// Expected output: 3.141592653589793

console.log(calculateCircumference(10));
// Expected output: 62.83185307179586

.=3.14159\mathtt{Math.PI} = \pi \approx 3.14159
Property attributes of Math.PI

PI Math , Math Math.PI . (Math )

Math.PI

Math.PI .

js
function calculateCircumference(radius) {
  return Math.PI * (radius + radius);
}

calculateCircumference(1); // 6.283185307179586

Specification
ECMAScript 2027 LanguageSpecification
# sec-math.pi


Web Proxy Viewer  |  New URL  |  Original Page