Callable object computing the normalized axis of rotation defined by a quaternion.
a span containing the three coordinates of the axis if the quaternion is zero {1, 0, 0} is returned
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
std::cout << "Real: ";
std::cout << 72.9f << " -> (" << v[0] << ", " << v[1] << ", " << v[2] << ")\n";
std::cout << "Complex: ";
std::cout << kyosu::complex_t<float>(3.5f,-2.9f) << " -> (" << vc[0] << ", " << vc[1] << ", " << vc[2] << ")\n";
std::cout << "Quaternion: ";
std::cout << kyosu::quaternion_t<double>(1.,2.,3.,4.) << " -> " << vq[0] << ", " << vq[1] << ", " << vq[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