std::atan2, std::atan2f, std::atan2l
From cppreference.com
| Defined in header <cmath>
|
||
| (1) | ||
float atan2 ( float y, float x ); double atan2 ( double y, double x ); |
(until C++23) | |
| /*floating-point-type*/ atan2 ( /*floating-point-type*/ y, |
(since C++23) (constexpr since C++26) |
|
float atan2f( float y, float x ); |
(2) | (since C++11) (constexpr since C++26) |
long double atan2l( long double y, long double x ); |
(3) | (since C++11) (constexpr since C++26) |
| SIMD overload (since C++26) |
||
| Defined in header <simd>
|
||
| template< class V0, class V1 > constexpr /*math-common-simd-t*/<V0, V1> |
(S) | (since C++26) |
| Additional overloads (since C++11) |
||
| Defined in header <cmath>
|
||
template< class Integer > double atan2 ( Integer y, Integer x ); |
(A) | (constexpr since C++26) |
1-3) Computes the arc tangent of y / x using the signs of arguments to determine the correct quadrant. The library provides overloads of
std::atan2 for all cv-unqualified floating-point types as the type of the parameters.(since C++23)|
S) The SIMD overload performs an element-wise
std::atan2 on v_yand v_x.
|
(since C++26) |
|
A) Additional overloads are provided for all integer types, which are treated as double.
|
(since C++11) |
Contents |
[edit] Parameters
| y, x | - | floating-point or integer values |
[edit] Return value
If no errors occur, the arc tangent of y / x (arctan(| y |
| x |