Callable object computing the angle and axis coordinates from a quaternion.
a tuple an angle of rotation and a vector of \(\mathbb{R}^3\) representing the direction of the rotation axis.
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using e_t = float;
std::cout << "Real: "<< "\n";
e_t e0(1);
std::cout << e0 << " -> " << ae << ", (" << axe[0] << ", " << axe[1] << ", " << axe[2] << ") " "\n";
std::cout << "Complex: "<< "\n";
c_t c0(1, 5);
std::cout << c0 << " -> " << ac << ", (" << axc[0] << ", " << axc[1] << ", " << axc[2] << ") " "\n";
std::cout << "Quaternion: "<< "\n";
q_t q0(1, 5, 2, 3);
std::cout << q0 << " -> " << aq << ", (" << axq[0] << ", " << axq[1] << ", " << axq[2] << ") " "\n";
return 0;
}
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition: quaternion.hpp:27
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27