Merge pull request #895 from shellhub/master

optimization
This commit is contained in:
Yang Libin
2019-09-28 10:23:04 +08:00
committed by GitHub

View File

@ -18,7 +18,7 @@ public class AbsoluteValue {
* @return the absolute value of a number
*/
public static int absVal(int value) {
return value > 0 ? value : -value;
return value < 0 ? -value : value;
}
}