Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL atan2 Function
Syntax
Definition and Usage
Returns the arctangent of Y/X in the range -PI to PI.
Return Value
Example
Following is the piece of code, copy and paste this code into a file and verify the result.
#!/usr/bin/perl
$Y = 30;
$X = 60;
$ret_val = atan2 ($Y, $X );
print "atan2 of 30/60 is : $retval\n";
|
This will produce following result
atan2 of 30/60 is : 0.463647609000806
|
|

|
|
|