UNPKG

@abaplint/runtime

Version:
27 lines 721 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ipow = ipow; function ipow(input) { let base = undefined; if (typeof input.base === "number") { base = input.base; } else if (typeof input.base === "string") { base = parseFloat(input.base); } else { base = parseFloat(input.base.get().toString()); } let exp = undefined; if (typeof input.exp === "number") { exp = input.exp; } else if (typeof input.exp === "string") { exp = parseFloat(input.exp); } else { exp = parseFloat(input.exp.get().toString()); } return Math.pow(base, exp).toFixed(0); } //# sourceMappingURL=ipow.js.map