C atan2() Function

You are Here:

C atan2() Function

The atan2() function returns the angle in the plane between the positive x-axis and the ray from (0, 0) to the point (x, y), for atan2(y, x).

This function is defined in <math.h> header file.


C Compiler
#include <stdio.h> #include <math.h> int main() { printf("%lf", atan2(8, 2)); return 0; }




atan2(data_type y, data_type x)

Parameter Values

yRequiredSpecifies the y coordinate of the point.
xRequiredSpecifies the x coordinate of the point.

Return Value

NumberThe arc-tangent of the quotient of its arguments.
The return value will be between -π and π.
The return value is represented in radians.


Hi Developers, we almost covered 98% of String functions and Interview Question on C with examples for quick and easy learning.

We are working to cover every Single Concept in C.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author