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

20 lines
361 B
JavaScript
Raw Normal View History

GameLib.D3.API.Vector2 = function ApiVector2(x, y) {
if (GameLib.D3.Utils.UndefinedOrNull(x)) {
x = 0;
}
this.x = x;
if (GameLib.D3.Utils.UndefinedOrNull(y)) {
y = 0;
}
this.y = y;
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
};