Perl atan2 Function
This function returns the arctangent of Y/X in the range -PI to PI.
Following is the simple syntax for this function:
This function returns arctangent of Y/X in the range -PI to PI.
Following is the example code showing its basic usage −
#!/usr/bin/perl $Y = 30; $X = 60; $ret_val = atan2 ($Y, $X ); print "atan2 of 30/60 is : $retval\n";
When above code is executed, it produces the following result −
atan2 of 30/60 is :