Wednesday 15 August 2012

java - How to convert a number always to be negative? -


math.bus () converts any number to positive. Is there any work (which I can not remember) that supports on the other side: Change any number (no indication) to a negative number?

The only thing I could think of is: Math.bas (number) * -1

You can just type - abs , such as -Math.abs () < / P>


No comments:

Post a Comment