Last active
August 29, 2015 14:05
-
-
Save omgm/1c5b109bd8c374a0e56d to your computer and use it in GitHub Desktop.
vector.js' moveTo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Adding this test fails | |
// | |
describe('One vector: ', function () { | |
it('is moved to another position', function () { // is converted into another? | |
var x = new v(1,0,0); | |
var y = new v(1,1,0); | |
var c = x.distanceFrom(y); | |
c.should.eql(1); | |
x.moveTo(y); | |
var c = x.distanceFrom(y); | |
c.should.eql(0); // <--- fails here because x.distanceFrom(y) returns 1 (one). | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oh, interesting... must be a bug somewhere :-)