diff --git a/src/point.js b/src/point.js index 117589b..8d96b1f 100644 --- a/src/point.js +++ b/src/point.js @@ -1,8 +1,9 @@ export default class Point { constructor(x, y) { - this.x = Math.round(x); - this.y = Math.round(y); + // add zero to turn -0 into 0 + this.x = Math.round(x) + 0; + this.y = Math.round(y) + 0; } getX() { return this.x; }