2016-12-07 15:20:41 +01:00
|
|
|
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
|
|
|
};
|