Hi, nothing new on the outside. But on the inside we added a new data structure for coordinates:
/* Constructor */ var XY = function (x, y){ this.x = x || 0; this.y = y || 0; }
Some of its functions:
XY.prototype.add = function(xy){ return new XY(this.x + xy.x, this.y + xy.y); } XY.prototype.equals = function(xy){ return (this.x == xy.x, this.y == xy.y); }