Finishing up removing GLM_FORCE_SIZE_FUNC define and passing by copy scalars
This commit is contained in:
@@ -40,10 +40,10 @@ namespace glm
|
||||
typename genType::row_type const & x
|
||||
)
|
||||
{
|
||||
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
|
||||
assert(index >= 0 && index < m[0].length());
|
||||
|
||||
genType Result = m;
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
|
||||
for(length_t i = 0; i < m.length(); ++i)
|
||||
Result[i][index] = x[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -55,10 +55,10 @@ namespace glm
|
||||
length_t index
|
||||
)
|
||||
{
|
||||
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
|
||||
assert(index >= 0 && index < m[0].length());
|
||||
|
||||
typename genType::row_type Result;
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
|
||||
for(length_t i = 0; i < m.length(); ++i)
|
||||
Result[i] = m[i][index];
|
||||
return Result;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace glm
|
||||
typename genType::col_type const & x
|
||||
)
|
||||
{
|
||||
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
|
||||
assert(index >= 0 && index < m.length());
|
||||
|
||||
genType Result = m;
|
||||
Result[index] = x;
|
||||
@@ -85,7 +85,7 @@ namespace glm
|
||||
length_t index
|
||||
)
|
||||
{
|
||||
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
|
||||
assert(index >= 0 && index < m.length());
|
||||
|
||||
return m[index];
|
||||
}
|
||||
|
||||
@@ -60,14 +60,14 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
|
||||
{
|
||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
||||
assert(i >= 0 && i < this->length());
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) const
|
||||
{
|
||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
||||
assert(i >= 0 && i < this->length());
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
@@ -717,7 +717,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -726,7 +726,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -735,7 +735,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -744,7 +744,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -753,7 +753,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
}
|
||||
@@ -762,7 +762,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||
{
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
for(length_t i = 0, n = Result.length(); i < n; ++i)
|
||||
Result[i] = next_float(x[i]);
|
||||
return Result;
|
||||
}
|
||||
@@ -267,7 +267,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
for(length_t i = 0, n = Result.length(); i < n; ++i)
|
||||
Result[i] = prev_float(x[i]);
|
||||
return Result;
|
||||
}
|
||||
@@ -285,7 +285,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
for(length_t i = 0, n = Result.length(); i < n; ++i)
|
||||
Result[i] = next_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
for(length_t i = 0, n = Result.length(); i < n; ++i)
|
||||
Result[i] = prev_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)
|
||||
{
|
||||
vecType<uint, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
for(length_t i = 0, n = Result.length(); i < n; ++i)
|
||||
Result[i] = float_distance(x[i], y[i]);
|
||||
return Result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user