Callable object computing a quaternion from its to_rotation_matrix representation.
This function build rotation_matrix angles from a quaternion.
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
std::cout << "Quaternion: "<< "\n";
q_t q0(1, 5, 2, 3);
std::cout << "q0 = " << q0 << std::endl;
std::cout << "to_rotation_matrix(q0) = \n";
{
std::cout << " ";
for(
int j=0;
j < 2 ; ++
j)
{
std::cout << m[
i][
j] <<
", ";
}
std::cout << m[
i][2] <<
"\n";
}
return 0;
}
constexpr auto j
Computes the complex number j i.e. quaternion(0, 0, 1, 0) in the chosen type.
Definition: j.hpp:74
constexpr auto i
Computes the complex number in the chosen type.
Definition: i.hpp:69
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition: quaternion.hpp:24
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27