r3-legacy/src/game-lib-api-vector2.js

11 lines
229 B
JavaScript

GameLib.D3.API.Vector2 = function Vector2(x, y) {
this.x = x || 0;
this.y = y || 0;
};
GameLib.D3.API.Vector2.prototype.copy = function () {
return new GameLib.D3.API.Vector2(
this.x,
this.y
);
};