Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
819 bytes
|
Line | |
---|
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 | // name, unit
|
---|
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 | //# sourceMappingURL=math.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.