@genexus/web-standard-functions
Version:
GeneXus JavaScript standard functions library for web generators
17 lines • 516 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.negate = void 0;
const gxbignumber_1 = require("../types/gxbignumber");
const negate = (num) => {
let res;
num = new gxbignumber_1.GxBigNumber(num);
if (num.intNumberAll.toString().indexOf("-") !== -1) {
res = num.toString().replace("-", "");
}
else {
res = "-" + num.toString();
}
return new gxbignumber_1.GxBigNumber(res);
};
exports.negate = negate;
//# sourceMappingURL=negate.js.map