This page was translated from English by the community.Learn more and join the MDN Web Docs community.
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() 정적 메서드는 숫자의 역사인(라디안 단위)을 반환합니다.
In this article
시도해 보기
// 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의 역사인(라디안 단위의 각도가 이상 이하).만약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> |