19#ifndef UTILS_VEC_ROTATE_HPP
20#define UTILS_VEC_ROTATE_HPP
22#include <boost/qvm/quat_vec_operations.hpp>
42 if (std::abs(angle) > std::numeric_limits<double>::epsilon()) {
53 return std::acos(v1 * v2 / std::sqrt(v1.
norm2() * v2.
norm2()));
Vector implementation and trait types for boost qvm interoperability.
Vector3d vec_rotate(const Vector3d &axis, double angle, const Vector3d &vector)
Rotate a vector around an axis.
double angle_between(Vector3d const &v1, Vector3d const &v2)
Determine the angle between two vectors.
Quaternion implementation and trait types for boost qvm interoperability.
Quaternion representation.