A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/sin below:

Math.sin() - JavaScript | MDN

Math.sin()

Baseline Widely available

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 파라미터
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
명세서 브라우저 호환성 함께 보기

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4