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