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.
Example
C Compiler
#include <stdio.h>
#include <math.h>
int main()
{
printf("%lf", atan2(8, 2));
return 0;
}
Output
1.325818
Syntax
atan2(data_type y, data_type x)
Parameter Values
Value | Type | Explanation |
---|---|---|
y | Required | Specifies the y coordinate of the point. |
x | Required | Specifies the x coordinate of the point. |
Return Value
Value | Explanation |
---|---|
Number | The arc-tangent of the quotient of its arguments. The return value will be between -π and π. The return value is represented in radians. |
Reminder
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.