home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


atan2

atan2 
y
, 
x

Returns the arctangent of y / x in the range -[pi] to [pi]. A quick way to get an approximate value of [pi] is to say:

$pi = atan2(1,1) * 4;
For the tangent operation, you may use the POSIX::tan() function, or use the familiar relation:
sub tan { sin($_[0]) / cos($_[0]) }


Previous: Reference: alarm Perl in a Nutshell Next: Reference: bind
Reference: alarm Book Index Reference: bind

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.