diff --git a/common/src/objs/xcursor.mjs b/common/src/objs/xcursor.mjs index 4ad511c..63fd182 100644 --- a/common/src/objs/xcursor.mjs +++ b/common/src/objs/xcursor.mjs @@ -78,7 +78,7 @@ export default class XCursor extends DrawableObject { if(this.approximate) { approx = (this.targetElement.execute(this.x.execute())) let intLength = Math.round(approx).toString().length - let rounding = Math.min(this.rounding, approx.toString().length - intLength - 1) + let rounding = Math.max(0, Math.min(this.rounding, approx.toString().length - intLength - 1)) approx = approx.toPrecision(rounding + intLength) } return approx