Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. JavaScript
  3. JavaScript 참고서
  4. 표준 내장 객체
  5. Math
  6. Math.asin()

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

View in EnglishAlways switch to English

Math.asin()

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.asin() 정적 메서드는 숫자의 역사인(라디안 단위)을 반환합니다.

x[1,1],𝙼𝚊𝚝𝚑.𝚊𝚜𝚒𝚗(𝚡)=arcsin(x)=the unique y[π2,π2] such that sin(y)=x\forall x \in [{-1}, 1],;\mathtt{\operatorname{Math.asin}(x)} = \arcsin(x) = \text{the unique } y \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right] \text{ such that } \sin(y) = x

시도해 보기

// Calculates angle of a right-angle triangle in radiansfunction calcAngle(opposite, hypotenuse) {  return Math.asin(opposite / hypotenuse);}console.log(calcAngle(6, 10));// Expected output: 0.6435011087932844console.log(calcAngle(5, 3));// Expected output: NaN

구문

js
Math.asin(x)

매개 변수

x

각도의 사인 값을 나타내는 -1 이상 1 이하의 숫자.

반환 값

x의 역사인(라디안 단위의 각도가-π2-\frac{\pi}{2} 이상π2\frac{\pi}{2} 이하).만약x가 -1 미만이거나 1 초과인 경우NaN을 반환합니다.

설명

asin()Math의 정적 메서드이므로, 생성한Math 객체의 메서드가 아니라 항상Math.ataasinn()으로 사용합니다(Math는 생성자가 아닙니다).

예제

Math.asin() 사용하기

js
Math.asin(-2); // NaNMath.asin(-1); // -1.5707963267948966 (-π/2)Math.asin(-0); // -0Math.asin(0); // 0Math.asin(0.5); // 0.5235987755982989 (π/6)Math.asin(1); // 1.5707963267948966 (π/2)Math.asin(2); // NaN

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-math.asin

브라우저 호환성

같이 보기

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp