Syntax

atan2 Y,X

Definition and Usage

Returns the arctangent of Y/X in the range -PI to PI.

Return Value

  • arctangent of Y/X in the range -PI to PI.

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 : $retvaln";
This will produce following result
atan2 of 30/60 is : 0.463647609000806

What Do You Think on This ? Say Here