What is the best way to switch between a positive and negative value in a statement (in the example of a boolean):
myBoo = !myBoo
To do the same with an int I would need to check with if statement:
if (val >= 0)
{
     val = val*-1
}
else
{
    val = Math.abs(val);
}
is there a more direct way to do this?
Thanks in advance
 
     
     
     
     
    