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 /test/01-test-vec2.js | |
| parent | 8a8b78b3f6a4ce930263099fe14b0fe86d11597f (diff) | |
handling coplanar walls correctly
Diffstat (limited to 'test/01-test-vec2.js')
| -rw-r--r-- | test/01-test-vec2.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/01-test-vec2.js b/test/01-test-vec2.js index 054d37b..b38f052 100644 --- a/test/01-test-vec2.js +++ b/test/01-test-vec2.js @@ -38,6 +38,13 @@ describe('vec2', function(){ assert.equal(false, vec.contains( -5 )); assert.equal(false, vec.contains( 15 )); }) + it('containsCenter itself', function(){ + assert.equal(true, vec.containsCenter( 5 )); + }) + it('does not containsCenter its endpoints', function(){ + assert.equal(false, vec.containsCenter( 0 )); + assert.equal(false, vec.containsCenter( 10 )); + }) it('intersects when only startpoint matches', function(){ assert.equal(true, vec.intersects( new vec2(-5, 0) )); }) |
