1 #ifndef BLOBS_GRAPHICS_GLM_HPP_
2 #define BLOBS_GRAPHICS_GLM_HPP_
4 #ifndef GLM_FORCE_RADIANS
5 # define GLM_FORCE_RADIANS 1
10 #include <glm/gtx/norm.hpp>
11 #include <glm/gtx/component_wise.hpp>
13 // GLM moved tvec[1234] from glm::detail to glm in 0.9.6
18 using tvec1 = detail::tvec1;
19 using tvec2 = detail::tvec2;
20 using tvec3 = detail::tvec3;
21 using tvec4 = detail::tvec4;
27 inline bool allzero(const T &v) noexcept {
28 return glm::length2(v) <
29 std::numeric_limits<typename T::value_type>::epsilon()
30 * std::numeric_limits<typename T::value_type>::epsilon();
34 inline bool anynan(const T &v) noexcept {
35 return glm::any(glm::isnan(v));