diff options
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec2.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/vec2.js | 4 |
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) ) } } |
