diff options
| -rw-r--r-- | rectangles.html | 1 | ||||
| -rw-r--r-- | vec2.js | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/rectangles.html b/rectangles.html index 7acc52b..882b862 100644 --- a/rectangles.html +++ b/rectangles.html @@ -56,7 +56,6 @@ canvas.addEventListener("mousedown", function(e){ if (e.shiftKey && dragging) { dragging.quantize(10) } - }) canvas.addEventListener("mousemove", function(e){ var x, y @@ -11,7 +11,7 @@ vec2.prototype.length = function(){ vec2.prototype.clone = function(){ return new vec2(this.a, this.b) } -vec2.prototype.normalize = function(){ +vec2.prototype.abs = function(){ if (this.b < this.a) { this.a = this.a ^ this.b this.b = this.a ^ this.b |
