negate
Switch the sign of the input value.
Positive values turn negative:
g.negate(42);
And negative values turn positive:
g.negate(-33);
Zero stays zero:
g.negate(0);
Switch the sign of the input value.
Positive values turn negative:
g.negate(42);
And negative values turn positive:
g.negate(-33);
Zero stays zero:
g.negate(0);