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