## ◆ atan2d()

 IEEEValue boost::simd::atan2d ( IEEEValue const & y, IEEEValue const & x )

This function object returns the atan2d function : atan2 in degrees.

Note

For every parameters of same floating type atan2d(y, x) is similar to: indeg(atan2(y, x))

atan2, atan2pi
Example:
#include <boost/simd/trigonometric.hpp>
#include <boost/simd/pack.hpp>
#include <boost/simd/function/reverse.hpp>
#include <iostream>
namespace bs = boost::simd;
using pack_ft = bs::pack <float, 4>;
int main()
{
pack_ft pf = {1.0f, 2.0f, -1.0f, 0.5f};
pack_ft qf = bs::reverse(pf);
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<< "-> bs::atan2d(pf, qf) = " << bs::atan2d(pf, qf) << '\n';
float xf = 2.0f, yf = 3.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<< "-> bs::atan2d(xf, yf) = " << bs::atan2d(xf, yf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
<- qf = (0.5, -1, 2, 1)
-> bs::atan2d(pf, qf) = (63.435, 116.565, -26.5651, 26.5651)
---- scalar
<- xf = 2
<- yf = 3
-> bs::atan2d(xf, yf) = 33.6901