diff options
| author | Julie Lala <jules@okfoc.us> | 2014-07-23 15:15:21 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-07-23 15:27:42 -0400 |
| commit | c3d855b3f0b6af000c0d359da6a2b774bcd0a5d5 (patch) | |
| tree | 7ab85a3a83fbffefd86c494e262f2a25edbcded8 /public/assets/javascripts/rectangles/models/vec2.js | |
| parent | 8a8b78b3f6a4ce930263099fe14b0fe86d11597f (diff) | |
handling coplanar walls correctly
Diffstat (limited to 'public/assets/javascripts/rectangles/models/vec2.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/vec2.js | 3 |
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 447c7a3..5c2b519 100644 --- a/public/assets/javascripts/rectangles/models/vec2.js +++ b/public/assets/javascripts/rectangles/models/vec2.js @@ -70,6 +70,9 @@ vec2.prototype.contains = function(n){ return this.a <= n && n <= this.b } + vec2.prototype.containsCenter = function(n){ + return this.a < n && n < this.b + } vec2.prototype.containsDisc = function(n,r){ return this.a <= n-r && n+r <= this.b } |
