1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00
Files
mywebsite/node_modules/es5-ext/math/cosh/shim.js

12 lines
206 B
JavaScript

'use strict';
var exp = Math.exp;
module.exports = function (x) {
if (isNaN(x)) return NaN;
x = Number(x);
if (x === 0) return 1;
if (!isFinite(x)) return Infinity;
return (exp(x) + exp(-x)) / 2;
};