Contents
Login Register Wishes Forum About
Language Reference » Misc functions » getAngle
Help topics
Latest updates
2208d  replaceImageMapTitle
2208d  replaceImageMapValues
2208d  createFunctionSerie
2208d  setAbsicssaPosition
2208d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
getAngle- Determine the angle of a line

This function returns the angle in degrees made by the specified line and the horizontal axis. It is used internally for some trigonometric computing.

Calling this function
getAngle($X1,$Y1,$X2,$Y2);
Where :

X1,Y1 is the start coordinate of the line.
X2,Y2 is the end coordinate of the line.




Sample script

 /* Return the angle made by this line and the horizontal axis */
 echo $myPicture->getAngle(10,10,200,200);

This will print 45.
Last updated on 10/19/2009 
by Jean-Damien 
Linked resources
  There is no linked topic yet.
Community comments
  No comments have been posted yet.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 409 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.