Namespaces
Variants
Actions

std::atan2(std::valarray)

From cppreference.com
< cpp‎ | numeric‎ | valarray
 
 
 
 
Defined in header <valarray>
template< class T >
std::valarray<T> atan2( const std::valarray<T>& y, const std::valarray<T>& x );
(1)
template< class T >

std::valarray<T> atan2( const std::valarray<T>& y,

                        const typename std::valarray<T>::value_type& vx );
(2)
template< class T >

std::valarray<T> atan2( const typename std::valarray<T>::value_type& vy,

                        const std::valarray<T>& x );
(3)

Computes the inverse tangent of y / x using the signs of arguments to correctly determine quadrant.

1) Computes the inverse tangent of each pair of corresponding values from y and x.

The behavior is undefined if x.size() != y.size().

2) Computes the inverse tangent of vx and each value in the numeric array y.
3) Computes the inverse tangent of vy and each value in the numeric array x.

Contents