PHP atan2() FunctionPHP atan2() is also predefined trigonometry function, which is used to return the arc tangent of two variables x and y or returns the angle theta of different (x,y) points with the atan2() function. Note: The arc tangent of y/x in radians and between -Pi and Pi.Syntax:
Example 1Output: Your number is : (0.50,0.50) By using 'atan2()' function your number is :0.78539816339745 Example 2Output: Your number is : (-0.50,-0.50) By using 'atan2()' function your number is :0.78539816339745 Example 3Output: Your number is : (5,5) By using 'atan2()' function your number is :0.78539816339745 Example 4Output: Your number is : (-5,-5) By using 'atan2()' function your number is :-2.3561944901923 Example 5Output: Your number is : (-5,5) By using 'atan2()' function your number is :-0.78539816339745
Next TopicPHP Math
|