15 #ifndef GEOMETRY__VECTOR3__NORMALIZE_HPP_
16 #define GEOMETRY__VECTOR3__NORMALIZE_HPP_
27 template <typename T, std::enable_if_t<IsLikeVector3<T>::value, std::nullptr_t> =
nullptr>
30 const auto n =
norm(v);
31 if (std::fabs(n) <= std::numeric_limits<double>::epsilon()) {
33 "size of norm (", v.x,
",", v.y,
",", v.z,
") is, ", n,
34 " size of the vector you want to normalize should be over ",
35 std::numeric_limits<double>::epsilon());
#define THROW_SIMULATION_ERROR(...)
Definition: exception.hpp:60
auto norm(const T &v)
Definition: norm.hpp:25
auto normalize(const T &v)
Definition: normalize.hpp:28
Definition: bounding_box.hpp:32