random boolean + reverse equation?

hi, there is a more elegant way to write this code ?
in my context, i would like to inverse the proprety easeX but randomly.

PHP:
            if(Boolean(Math.round(Math.random()))){ obj.easeX = ~obj.easeX+1;};
            if(Boolean(Math.round(Math.random()))){ obj.easeY = ~obj.easeY+1;};
if one have a beter sugestion.
because it is a little heavy for make a simple random reverse.
but I can't imagine another way cleaner.
thank you
So the code should flip the sign of the number and the expression of the if statement generates either a 1 or 0. I think this can be simplified.
Code:
if (Math.random() < 0.5) {
    obj.easeX  *= -1;
}
yes thank you, after sleeping, the solution jumps to my eyes, these fascinate how the brain becomes useless with exhaustion.

PHP:
var end = (function(){ //register Closures setup
        var easeX = setup.xStrength||0;
        var easeY = setup.yStrength||0;
        var rot = setup.rotStrength||0;
        var time = setup.time||100;
        var oX = pixiBox.x;
        var oY = pixiBox.y;
        return function(obj){
            var rand1 = Math.random();
            var rand2 = Math.random();
            if(rand1>0.5){ easeX = ~easeX+1;};
            if(rand2>0.5){easeY = ~easeY+1;};
          this._valuesEnd = {x:oX+(rand1*easeX+1), y:oY+(rand2*easeY+1), rotation:(rand1*rot)/100 };
          this.duration(rand1*time+time);
          this.start();
        };
    })();

Original thread: https://forums.rpgmakerweb.com/threads/random-boolean-reverse-equation.86687/