From 73fdf8d46f10793d210f4369adb8c31afa536d20 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 21 Aug 2015 16:59:48 -0400 Subject: thinking --- public/assets/javascripts/rectangles/models/vec2.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'public/assets/javascripts/rectangles/models/vec2.js') diff --git a/public/assets/javascripts/rectangles/models/vec2.js b/public/assets/javascripts/rectangles/models/vec2.js index d37bc12..226e56f 100644 --- a/public/assets/javascripts/rectangles/models/vec2.js +++ b/public/assets/javascripts/rectangles/models/vec2.js @@ -114,6 +114,9 @@ vec2.prototype.containsVec = function(v){ return this.a <= v.a && v.b <= this.b } + vec2.prototype.containsCenterVec = function(v){ + return this.a < v.a && v.b < this.b + } vec2.prototype.clamp = function(n){ return clamp(n, this.a, this.b) } -- cgit v1.2.3-70-g09d2