1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createCosh = void 0;
|
7 |
|
8 | var _factory = require("../../utils/factory");
|
9 |
|
10 | var _collection = require("../../utils/collection");
|
11 |
|
12 | var _number = require("../../utils/number");
|
13 |
|
14 | var name = 'cosh';
|
15 | var dependencies = ['typed'];
|
16 | var createCosh = (0, _factory.factory)(name, dependencies, function (_ref) {
|
17 | var typed = _ref.typed;
|
18 |
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | var cosh = typed(name, {
|
41 | number: _number.cosh,
|
42 | Complex: function Complex(x) {
|
43 | return x.cosh();
|
44 | },
|
45 | BigNumber: function BigNumber(x) {
|
46 | return x.cosh();
|
47 | },
|
48 | Unit: function Unit(x) {
|
49 | if (!x.hasBase(x.constructor.BASE_UNITS.ANGLE)) {
|
50 | throw new TypeError('Unit in function cosh is no angle');
|
51 | }
|
52 |
|
53 | return cosh(x.value);
|
54 | },
|
55 | 'Array | Matrix': function ArrayMatrix(x) {
|
56 | return (0, _collection.deepMap)(x, cosh);
|
57 | }
|
58 | });
|
59 | return cosh;
|
60 | });
|
61 | exports.createCosh = createCosh; |
\ | No newline at end of file |