|
|
@ -31,17 +31,13 @@ |
|
|
|
namespace glm |
|
|
|
namespace glm |
|
|
|
{ |
|
|
|
{ |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThan |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> lessThan(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] < y[i]; |
|
|
|
Result[i] = x[i] < y[i]; |
|
|
|
|
|
|
|
|
|
|
@ -49,81 +45,61 @@ namespace glm |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThanEqual |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] <= y[i]; |
|
|
|
Result[i] = x[i] <= y[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThan |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThan(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] > y[i]; |
|
|
|
Result[i] = x[i] > y[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThanEqual |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, |
|
|
|
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors"); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] >= y[i]; |
|
|
|
Result[i] = x[i] >= y[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type equal |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> equal(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] == y[i]; |
|
|
|
Result[i] = x[i] == y[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type notEqual |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> notEqual(vecType<T, P> const & x, vecType<T, P> const & y) |
|
|
|
( |
|
|
|
|
|
|
|
vecType<T, P> const & x, |
|
|
|
|
|
|
|
vecType<T, P> const & y |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
assert(detail::component_count(x) == detail::component_count(y)); |
|
|
|
|
|
|
|
|
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) |
|
|
|
Result[i] = x[i] != y[i]; |
|
|
|
Result[i] = x[i] != y[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
@ -150,7 +126,7 @@ namespace glm |
|
|
|
template <precision P, template <typename, precision> class vecType> |
|
|
|
template <precision P, template <typename, precision> class vecType> |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v) |
|
|
|
GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v) |
|
|
|
{ |
|
|
|
{ |
|
|
|
typename vecType<bool, P>::bool_type Result(uninitialize); |
|
|
|
vecType<bool, P> Result(uninitialize); |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) |
|
|
|
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) |
|
|
|
Result[i] = !v[i]; |
|
|
|
Result[i] = !v[i]; |
|
|
|
return Result; |
|
|
|
return Result; |
|
|
|