67 void validate()
const {
68 auto constexpr eps = 10. * std::numeric_limits<double>::epsilon();
69 if (std::fabs(m_orientation * m_axis) > eps) {
70 throw std::runtime_error(
71 "CylindricalTransformationParameters: Axis and orientation must be "
72 "orthogonal. Scalar product is " +
73 std::to_string(m_orientation * m_axis));
75 if (std::fabs(m_axis.norm() - 1.) > eps) {
76 throw std::runtime_error(
"CylindricalTransformationParameters: Axis must "
77 "be normalized. Norm is " +
78 std::to_string(m_axis.norm()));
80 if (std::fabs(m_orientation.
norm() - 1.) > eps) {
81 throw std::runtime_error(
"CylindricalTransformationParameters: "
82 "orientation must be normalized. Norm is " +
83 std::to_string(m_orientation.
norm()));
Vector implementation and trait types for boost qvm interoperability.
Vector< T, N > calc_orthonormal_vector(Vector< T, N > const &vec)
Return a vector that is orthonormal to vec.