C atan2() Function

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.

Example

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

Syntax

atan2(data_type y, data_type x)

Parameter Values

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

Return Value

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

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