Reduced dependencies of GTX_component_wise

master
Christophe Riccio ago%!(EXTRA string=12 years)
parent 9f8112f93a
commit 18d67da79c
  1. 4
      glm/gtx/component_wise.hpp
  2. 8
      glm/gtx/component_wise.inl

@ -38,8 +38,8 @@
#ifndef GLM_GTX_component_wise
#define GLM_GTX_component_wise
// Dependency:
#include "../glm.hpp"
// Dependencies
#include "../detail/setup.hpp"
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
# pragma message("GLM: GLM_GTX_component_wise extension included")

@ -13,7 +13,7 @@ namespace glm
GLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v)
{
T result(0);
for(int i = 0; i < v.length(); ++i)
for(length_t i = 0; i < v.length(); ++i)
result += v[i];
return result;
}
@ -22,7 +22,7 @@ namespace glm
GLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v)
{
T result(1);
for(int i = 0; i < v.length(); ++i)
for(length_t i = 0; i < v.length(); ++i)
result *= v[i];
return result;
}
@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v)
{
T result(v[0]);
for(int i = 1; i < v.length(); ++i)
for(length_t i = 1; i < v.length(); ++i)
result = min(result, v[i]);
return result;
}
@ -40,7 +40,7 @@ namespace glm
GLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v)
{
T result(v[0]);
for(int i = 1; i < v.length(); ++i)
for(length_t i = 1; i < v.length(); ++i)
result = max(result, v[i]);
return result;
}

Loading…
Cancel
Save