is there a way to use the ‘tertiary operator’ to shorten this code?
[AS]if (this._x<0) {
this._x = Width;
}
if (this._x>Width) {
this._x = 0;
}
if (this._y<0) {
this._y = Heigth;
}
if (this._y>Heigth) {
this._y = 0;
}[/AS]
i tried AS?this._x = Width;
(this._x>Width)?this._x = 0;
(this._y<0)?this._y = Heigth;
(this._y>Heigth)?this._y = 0;[/AS]
but an error comes up…