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

11 lines
229 B
JavaScript
Raw Normal View History

2016-12-01 18:37:57 +01:00
GameLib.D3.API.Vector2 = function Vector2(x, y) {
this.x = x || 0;
this.y = y || 0;
2016-12-02 16:03:03 +01:00
};
GameLib.D3.API.Vector2.prototype.copy = function () {
return new GameLib.D3.API.Vector2(
this.x,
this.y
);
2016-12-01 18:37:57 +01:00
};