Comparing version 0.0.15 to 0.0.16
{ | ||
"name": "jscoord", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "A simple Map coordinate system for NodeJS and potentially the browser.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,3 +38,3 @@ class JSCoord { | ||
decrX (amount = 1) { | ||
if (this.map && this.map.x && (this.x + amount > this.map.x || this.x + amount < 0 - this.map.x)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
if (this.map && this.map.x && (this.x - amount > this.map.x || this.x - amount < 0 - this.map.x)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
this.x -= amount | ||
@@ -59,3 +59,3 @@ return this | ||
decrY (amount = 1) { | ||
if (this.map && this.map.y && (this.y + amount > this.map.y || this.y + amount < 0 - this.map.y)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
if (this.map && this.map.y && (this.y - amount > this.map.y || this.y - amount < 0 - this.map.y)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
this.y -= amount | ||
@@ -80,3 +80,3 @@ return this | ||
decrZ (amount = 1) { | ||
if (this.map && this.map.z && (this.z + amount > this.map.z || this.z + amount < 0 - this.map.z)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
if (this.map && this.map.z && (this.z - amount > this.map.z || this.z - amount < 0 - this.map.z)) { throw new Error("New amount does not exceed minimum map size.") } else { | ||
this.z -= amount | ||
@@ -83,0 +83,0 @@ return this |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0