Reduced dependencies of GTX_component_wise

This commit is contained in:
Christophe Riccio 2013-12-25 05:32:47 +01:00
parent 9f8112f93a
commit 18d67da79c
2 changed files with 6 additions and 6 deletions

View File

@ -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")

View File

@ -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;
}