note 60597 added to function.atan
| From: | joelperr at kiwi-interactif dot com | Date: | Thu, 12 Jan 2006 01:12:28 +0000 |
| Subject: | note 60597 added to function.atan | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101592@lists.php.net to get a copy of this message | ||
to obtain the direction of the line, you are better to use the <? atan2((y2-y1)/(x2-x1)) ?>
function, since the regular atan function will only return arguments in the half-plane, ie. if y2-y1
and x2-x1 are negative, atan will give you an angle measurement less than 90 degrees, while it
really should be between 180 and 270
----
Manual Page -- http://www.php.net/manual/en/function.atan.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60597
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60597&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60597&report=yes
Search -- http://master.php.net/manage/user-notes.php