UNPKG
phpjs
Version:
latest (1.3.2)
1.3.2
1.2.2
1.1.2
1.0.2
1.0.1
1.0.0
0.0.1
php.js offers community built php functions in javascript
phpjs.org
kvz/phpjs
phpjs
/
functions
/
math
/
cosh.js
8 lines
(7 loc)
•
235 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
cosh
(
arg
) {
// discuss at: http://phpjs.org/functions/cosh/
// original by: Onno Marsman
// example 1: cosh(-0.18127180117607017);
// returns 1: 1.0164747716114113
return
(
Math
.
exp
(arg) +
Math
.
exp
(-arg)) /
2
; }