[SOLVED] Get inverse of variable

this.stopAngle = this.manager.script.spinManager.stopAngle;
this.slowAngle = inverse this.stopAngle;

So lets say stopAngle is 55, I want slowAngle to be -55. How would I make this work?

Multiply it by -1?

20 character limit

this.slowAngle = - this.stopAngle;

if this.stopAngle is a string then it could not work. As @yaustar suggested multiply by -1 so that JS will try to convert the string value into a number.

this.slowAngle = this.stopAngle * -1;

this.stopAngle is a number value. So I guess either would work, thanks.