Math.sin()
함수는 숫자의 사인값을 반환합니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Syntax
Math.sin(x)
파라미터
x
- 숫자 (라디안으로 주어짐).
반환 값
주어진 숫자의 사인 값
설명
Math.sin()
메소드는 라디안으로 주어진 각도의 사인 값인 -1과 1 사이의 수를 반환합니다.
sin()
은 Math
의 스태틱 메소드이기 때문에, Math
오브젝트 의 메소드로 사용하지 말고 항상 Math.sin()
로 사용해야합니다. (Math
는 생성자가 아닙니다).
예
Using Math.sin()
Math.sin(0); // 0
Math.sin(1); // 0.8414709848078965
Math.sin(Math.PI / 2); // 1
Specifications
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | 최초 정의. JavaScript 1.0. 에서 구현됨 |
ECMAScript 5.1 (ECMA-262) The definition of 'Math.sin' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.sin' in that specification. |
Standard | |
ECMAScript (ECMA-262) The definition of 'Math.sin' in that specification. |
Living Standard |
브라우저 호환성
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.