note 95561 deleted from function.abs by danbrown
| From: | danbrown@php.net | Date: | Sat, 09 Jan 2010 15:16:24 +0000 |
| Subject: | note 95561 deleted from function.abs by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164809@lists.php.net to get a copy of this message | ||
Note Submitter: Kubwa
----
There is a much easier way to swap a negative to positive and positiov to negative number.
$new_y = -$y;
So when $y is 2 it will be -2, when $y is -4 $y will be --4 which means 4.