![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/libs/absol-full/dist/js/ |
Upload File : |
/*** module: node_modules/absol-form/js/sclang/SCBinaryOperators.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ADD = ADD; exports.SUB = SUB; exports.MUL = MUL; exports.DIV = DIV; exports.NEGATIVE = NEGATIVE; exports.POSITIVE = POSITIVE; var _datetime = require("absol/src/Time/datetime"); function ADD(a, b) { var type_a = typeof a; var type_b = typeof b; if (type_a === "number" && type_b === "number") { return a + b; } if (type_a === "undefined" && type_b === "undefined") return undefined; if (type_a === 'string' && type_b === 'string') { return a + b; } if (a instanceof Date) { if (type_b === 'number') { return new Date(a.getTime() + _datetime.MILLIS_PER_DAY * b); } } console.error("Can not add: ", a, b); return NaN; } function SUB(a, b) { var type_a = typeof a; var type_b = typeof b; if (type_a === "number" && type_b === "number") { return a - b; } if (type_a === "undefined" && type_b === "undefined") return undefined; if (a instanceof Date) { if (type_b === 'number') { return new Date(a.getTime() - _datetime.MILLIS_PER_DAY * b); } } console.error("Can not sub: ", a, b); return NaN; } function MUL(a, b) { var type_a = typeof a; var type_b = typeof b; if (type_a === "number" && type_b === "number") { return a * b; } if (type_a === "undefined" && type_b === "undefined") return undefined; if (type_a === "string" && type_b === "number") { return a.repeat(b); } console.error("Can not mul: ", a, b); return NaN; } function DIV(a, b) { var type_a = typeof a; var type_b = typeof b; if (type_a === "number" && type_b === "number") { return a / b; } if (type_a === "undefined" && type_b === "undefined") return undefined; console.error("Can not div: ", a, b); return NaN; } function NEGATIVE(x) { return -x; } function POSITIVE(x) { return x; }