UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

8 lines 297 B
export function setToPrecision(value, precision) { const shift = 10 ** precision; return Math.round(value * shift) / shift; } export function getDecimalCount(value) { return value == 0 ? 0 : Math.max(0, -Math.floor(Math.log10(Math.abs(value)))); } //# sourceMappingURL=precision.js.map