UNPKG

@evojs/math

Version:
13 lines (12 loc) 320 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ceil = void 0; function ceil(x, digits) { if (digits === void 0) { digits = 0; } if (digits > 0) { digits = Math.pow(10, Math.round(digits)); return Math.ceil(x * digits) / digits; } return Math.ceil(x); } exports.ceil = ceil;