This page was translated from English by the community.Learn more and join the MDN Web Docs community.
Math.cosh()
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.cosh() 정적 메서드는 숫자의 쌍곡 코사인을 반환합니다. 이는 아래와 같습니다.
In this article
시도해 보기
console.log(Math.cosh(0));// Expected output: 1console.log(Math.cosh(1));// Expected output: 1.543080634815244 (approximately)console.log(Math.cosh(-1));// Expected output: 1.543080634815244 (approximately)console.log(Math.cosh(2));// Expected output: 3.7621956910836314구문
js
Math.cosh(x)매개 변수
x숫자.
반환 값
x의 쌍곡 코사인.
설명
Math의 정적 메서드이기 때문에cosh()는 생성한Math 객체(Math는 생성자가 아닙니다)의 메서드를 사용하기보다는 언제나Math.cosh()를 사용하세요.
예제
>Math.cosh() 사용하기
js
Math.cosh(-Infinity); // InfinityMath.cosh(-1); // 1.5430806348152437Math.cosh(-0); // 1Math.cosh(0); // 1Math.cosh(1); // 1.5430806348152437Math.cosh(Infinity); // Infinity명세서
| Specification |
|---|
| ECMAScript® 2026 Language Specification> # sec-math.cosh> |