27.06.2009, 22:52
I don't know what the hell you're doing with all this a/b nonsense, looks like BODMAS disaster in the making.
All you need to do is check if it's below 0, then either times it by -1, or subtract it from 0.
Eg. you have -5555
-5555 x -1 = 5555
0 - ( - 5555) = 5555
All you need to do is check if it's below 0, then either times it by -1, or subtract it from 0.
Eg. you have -5555
-5555 x -1 = 5555
0 - ( - 5555) = 5555