diff options
| author | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
| commit | 61e5bcef2629e2d68b805a956a96fff264d4f74d (patch) | |
| tree | bca3a94bac79d34e3c0db57c77604f5a823ecbda /deps/include/glm/gtx/norm.inl | |
| parent | 88c01588aa0830e219eaa62588839e4d1e2883ce (diff) | |
| download | voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.tar.bz2 voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.zip | |
Restructure dependencies and update to C++20
- Nuked static_assert from almost everywhere in the project
- Nuked binary dependency support. Might add one later though
- Separated dependency headers into a separate include subdirectory
- Grafted a thirdpartylegalnotices.txt generator from RITEG
- Pushed development snapshot version to 2126 (26th week of 2025)
Diffstat (limited to 'deps/include/glm/gtx/norm.inl')
| -rw-r--r-- | deps/include/glm/gtx/norm.inl | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/deps/include/glm/gtx/norm.inl b/deps/include/glm/gtx/norm.inl deleted file mode 100644 index 4a9f796..0000000 --- a/deps/include/glm/gtx/norm.inl +++ /dev/null @@ -1,95 +0,0 @@ -/// @ref gtx_norm - -#include "../detail/qualifier.hpp" - -namespace glm{ -namespace detail -{ - template<length_t L, typename T, qualifier Q, bool Aligned> - struct compute_length2 - { - GLM_FUNC_QUALIFIER static T call(vec<L, T, Q> const& v) - { - return dot(v, v); - } - }; -}//namespace detail - - template<typename genType> - GLM_FUNC_QUALIFIER genType length2(genType x) - { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'length2' accepts only floating-point inputs"); - return x * x; - } - - template<length_t L, typename T, qualifier Q> - GLM_FUNC_QUALIFIER T length2(vec<L, T, Q> const& v) - { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'length2' accepts only floating-point inputs"); - return detail::compute_length2<L, T, Q, detail::is_aligned<Q>::value>::call(v); - } - - template<typename T> - GLM_FUNC_QUALIFIER T distance2(T p0, T p1) - { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'distance2' accepts only floating-point inputs"); - return length2(p1 - p0); - } - - template<length_t L, typename T, qualifier Q> - GLM_FUNC_QUALIFIER T distance2(vec<L, T, Q> const& p0, vec<L, T, Q> const& p1) - { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'distance2' accepts only floating-point inputs"); - return length2(p1 - p0); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, Q> const& a, vec<3, T, Q> const& b) - { - return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, Q> const& v) - { - return abs(v.x) + abs(v.y) + abs(v.z); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T l2Norm(vec<3, T, Q> const& a, vec<3, T, Q> const& b - ) - { - return length(b - a); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T l2Norm(vec<3, T, Q> const& v) - { - return length(v); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T lxNorm(vec<3, T, Q> const& x, vec<3, T, Q> const& y, unsigned int Depth) - { - return pow(pow(abs(y.x - x.x), T(Depth)) + pow(abs(y.y - x.y), T(Depth)) + pow(abs(y.z - x.z), T(Depth)), T(1) / T(Depth)); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T lxNorm(vec<3, T, Q> const& v, unsigned int Depth) - { - return pow(pow(abs(v.x), T(Depth)) + pow(abs(v.y), T(Depth)) + pow(abs(v.z), T(Depth)), T(1) / T(Depth)); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T lMaxNorm(vec<3, T, Q> const& a, vec<3, T, Q> const& b) - { - return compMax(abs(b - a)); - } - - template<typename T, qualifier Q> - GLM_FUNC_QUALIFIER T lMaxNorm(vec<3, T, Q> const& v) - { - return compMax(abs(v)); - } - -}//namespace glm |
