1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var math_helper_js_1 = tslib_1.__importDefault(require("./math-helper.js"));
|
5 | var mathFunctions = {
|
6 |
|
7 | ceil: null,
|
8 | floor: null,
|
9 | sqrt: null,
|
10 | abs: null,
|
11 | tan: '',
|
12 | sin: '',
|
13 | cos: '',
|
14 | atan: 'rad',
|
15 | asin: 'rad',
|
16 | acos: 'rad'
|
17 | };
|
18 | for (var f in mathFunctions) {
|
19 | if (mathFunctions.hasOwnProperty(f)) {
|
20 | mathFunctions[f] = math_helper_js_1.default.bind(null, Math[f], mathFunctions[f]);
|
21 | }
|
22 | }
|
23 | mathFunctions.round = function (n, f) {
|
24 | var fraction = typeof f === 'undefined' ? 0 : f.value;
|
25 | return math_helper_js_1.default(function (num) { return num.toFixed(fraction); }, null, n);
|
26 | };
|
27 | exports.default = mathFunctions;
|
28 |
|
\ | No newline at end of file |