summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rectangles.html1
-rw-r--r--vec2.js2
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
diff --git a/vec2.js b/vec2.js
index 1860179..8bc8410 100644
--- a/vec2.js
+++ b/vec2.js
@@ -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