summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/vec2.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-08-18 15:01:56 -0400
committerJules Laplace <jules@okfoc.us>2014-08-18 15:01:56 -0400
commita8ed33d8313b093f589a5483cb00c7163b7b8dc3 (patch)
treedc4587fcb6559d86adcecf8d68fe6672d50a0e2f /public/assets/javascripts/rectangles/models/vec2.js
parent174077e0a9779f73b1b87253c8c7bae8d03400fb (diff)
surface tests
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec2.js')
-rw-r--r--public/assets/javascripts/rectangles/models/vec2.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/assets/javascripts/rectangles/models/vec2.js b/public/assets/javascripts/rectangles/models/vec2.js
index 214feb9..a36c614 100644
--- a/public/assets/javascripts/rectangles/models/vec2.js
+++ b/public/assets/javascripts/rectangles/models/vec2.js
@@ -123,12 +123,12 @@
}
vec2.prototype.union = function(v){
if (this.intersects(v)) {
- return new vec2( min(this.a,v.a), max(this.b, v.b) )
+ return new vec2( Math.min(this.a,v.a), Math.max(this.b, v.b) )
}
}
vec2.prototype.intersection = function(v){
if (this.intersects(v)) {
- return new vec2( max(this.a,v.a), min(this.b, v.b) )
+ return new vec2( Math.max(this.a,v.a), Math.min(this.b, v.b) )
}
}