mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Reduced dependencies of GTX_component_wise
This commit is contained in:
parent
9f8112f93a
commit
18d67da79c
@ -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…
Reference in New Issue
Block a user