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.sin()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Itโ€™s been available across browsers since โจ2015๋…„ 7์›”โฉ.

Math.sin() ํ•จ์ˆ˜๋Š” ์ˆซ์ž์˜ ์‚ฌ์ธ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

์‹œ๋„ํ•ด ๋ณด๊ธฐ

function getCircleY(radians, radius) {
  return Math.sin(radians) * radius;
}

console.log(getCircleY(1, 10));
// Expected output: 8.414709848078965

console.log(getCircleY(2, 10));
// Expected output: 9.092974268256818

console.log(getCircleY(Math.PI, 10));
// Expected output: 1.2246467991473533e-15

Syntax

js
Math.sin(x);

ํŒŒ๋ผ๋ฏธํ„ฐ

x

์ˆซ์ž (๋ผ๋””์•ˆ์œผ๋กœ ์ฃผ์–ด์ง).

๋ฐ˜ํ™˜ ๊ฐ’

์ฃผ์–ด์ง„ ์ˆซ์ž์˜ ์‚ฌ์ธ ๊ฐ’

์„ค๋ช…

Math.sin() ๋ฉ”์†Œ๋“œ๋Š” ๋ผ๋””์•ˆ์œผ๋กœ ์ฃผ์–ด์ง„ ๊ฐ๋„์˜ ์‚ฌ์ธ ๊ฐ’์ธ -1๊ณผ 1 ์‚ฌ์ด์˜ ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

sin() ์€ Math์˜ ์Šคํƒœํ‹ฑ ๋ฉ”์†Œ๋“œ์ด๊ธฐ ๋•Œ๋ฌธ์—, Math ์˜ค๋ธŒ์ ํŠธ ์˜ ๋ฉ”์†Œ๋“œ๋กœ ์‚ฌ์šฉํ•˜์ง€ ๋ง๊ณ  ํ•ญ์ƒ Math.sin()๋กœ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. (Math ๋Š” ์ƒ์„ฑ์ž๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค).

์˜ˆ

Using Math.sin()

js
Math.sin(0); // 0
Math.sin(1); // 0.8414709848078965

Math.sin(Math.PI / 2); // 1

๋ช…์„ธ์„œ

Specification
ECMAScriptยฎ 2026 Language Specification
# sec-math.sin

๋ธŒ๋ผ์šฐ์ € ํ˜ธํ™˜์„ฑ

ํ•จ๊ป˜ ๋ณด๊ธฐ