Math JavaScript Tutorial

Syntax

math.atan2(num1, num2)
The atan2() method calculates the arctangent of the quotient of its parameters.
It returns a numeric value between -PI and PI representing the angle theta of an (x,y) point.


    
    
    
    
    
    Enter First Number:
    
    

    Enter Second Number:
    
    


    
    

    Answer: