note 95561 added to function.abs
| From: | Kubwa at osu1 dot php dot net | Date: | Sat, 09 Jan 2010 13:49:53 +0000 |
| Subject: | note 95561 added to function.abs | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164806@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 217.160.72.57
Probable Submitter: 91.16.251.1
----
Manual Page -- http://www.php.net/manual/en/function.abs.php
Edit -- https://master.php.net/note/edit/95561
Del: integrated -- https://master.php.net/note/delete/95561/integrated
Del: useless -- https://master.php.net/note/delete/95561/useless
Del: bad code -- https://master.php.net/note/delete/95561/bad+code
Del: spam -- https://master.php.net/note/delete/95561/spam
Del: non-english -- https://master.php.net/note/delete/95561/non-english
Del: in docs -- https://master.php.net/note/delete/95561/in+docs
Del: other reasons-- https://master.php.net/note/delete/95561
Reject -- https://master.php.net/note/reject/95561
Search -- https://master.php.net/manage/user-notes.php