◆ inrad()

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

This function object converts degree to radian.

Header <boost/simd/function/inrad.hpp>
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::inrad(pf) = " << bs::inrad(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::inrad(xf) = " << bs::inrad(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::inrad(pf) = (0.0174533, 0.0349066, -0.0174533, 0.00872665)
---- scalar
<- xf = 2
-> bs::inrad(xf) = 0.0349066