Hint: Some useful methods

Recall that Math.abs will give you the absolute value.

The method for getting the sign of a value is Integer.signum.


Cary Gray
Last modified: Mon Feb 29 16:41:33 CST 2016