summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/vec2.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-21 16:59:48 -0400
committerJules Laplace <jules@okfoc.us>2015-08-21 16:59:48 -0400
commit73fdf8d46f10793d210f4369adb8c31afa536d20 (patch)
tree6453908c271929af3c192f6937b6d4eb57291f92 /public/assets/javascripts/rectangles/models/vec2.js
parent3e87dcb3de9ad29f7c021792cbafc32d4c758d3f (diff)
thinking
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec2.js')
-rw-r--r--public/assets/javascripts/rectangles/models/vec2.js3
1 files changed, 3 insertions, 0 deletions
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)
}