Skip to content

Instantly share code, notes, and snippets.

@omgm
Last active August 29, 2015 14:05
Show Gist options
  • Save omgm/1c5b109bd8c374a0e56d to your computer and use it in GitHub Desktop.
Save omgm/1c5b109bd8c374a0e56d to your computer and use it in GitHub Desktop.
vector.js' moveTo
//
// 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).
})
});
@rockbot
Copy link

rockbot commented Aug 18, 2014

oh, interesting... must be a bug somewhere :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment