◆ atand()

IEEEValue boost::simd::atand ( IEEEValue const &  x)

This function object returns the inverse tangent in degree.

Header <boost/simd/function/atand.hpp>
Note

For every parameter of floating type atand(x) returns the arc r in the interval \([-90, 90[\) such that tand(r) == x.

See also
atan2d, atan2, atan, atanpi, tand
Example:
#include <boost/simd/trigonometric.hpp>
#include <boost/simd/pack.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};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> bs::atand(pf) = " << bs::atand(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::atand(xf) = " << bs::atand(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::atand(pf) = (45, 63.435, -45, 26.5651)
---- scalar
<- xf = 2
-> bs::atand(xf) = 63.435