1 #ifndef BLANK_GEOMETRY_DISTANCE_HPP_
2 #define BLANK_GEOMETRY_DISTANCE_HPP_
7 #include <glm/gtx/component_wise.hpp>
8 #include <glm/gtx/norm.hpp>
14 inline bool iszero(const T &v) noexcept {
15 return length2(v) < std::numeric_limits<typename T::value_type>::epsilon();
19 T manhattan_distance(const glm::tvec3<T> &a, const glm::tvec3<T> &b) noexcept {
20 return compAdd(abs(a - b));
24 T manhattan_radius(const glm::tvec3<T> &v) noexcept {
25 return compMax(abs(v));