From a390354e9a02816f9598eacbf2bb49c28176211f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Mar 2013 11:26:58 -0500 Subject: move point stuff into point.js --- public/js/draw.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'public/js/draw.js') diff --git a/public/js/draw.js b/public/js/draw.js index 9116f78..b15416b 100644 --- a/public/js/draw.js +++ b/public/js/draw.js @@ -95,19 +95,3 @@ function Brush (b) { $("#drawing").append(canvas); } -function Point(e, offset) { - this.x = e.pageX - offset.left; - this.y = e.pageY - offset.top; -} -Point.prototype.add = function(p) { - this.x += p.x; - this.y += p.y; -} -Point.prototype.subtract = function(p) { - this.x -= p.x; - this.y -= p.y; -} -Point.prototype.quantize = function(x, y) { - this.x = Math.floor( this.x / x ) * x; - this.y = Math.floor( this.y / y ) * y; -} -- cgit v1.2.3-70-g09d2