Quote:
Originally Posted by Vaupell
muiltiply by 1 does not do anything
-500 * 1 = -500 still..
try it on your calculator in your OS.
|
Maybe you should re-read what I posted?
-500 * -1 = 500. Hence the if statement to make sure the result is less than 1. If result is positive then it wouldn't need to do anything to it.
Though really looking back at it what I put was slightly wrong. It should be if ($result < 0) rather than <= 0 as there's no point multiplying 0 by -1.