mirror of
https://github.com/g-truc/glm.git
synced 2025-04-08 06:43:10 +00:00
Fixed any and all for scalars
This commit is contained in:
parent
59b9a780e9
commit
6799127ec6
2 changed files with 8 additions and 14 deletions
|
@ -71,20 +71,18 @@ namespace glm
|
|||
|
||||
GLM_FUNC_QUALIFIER bool any
|
||||
(
|
||||
bool const & x,
|
||||
bool const & y
|
||||
bool const & x
|
||||
)
|
||||
{
|
||||
return x || y;
|
||||
return x;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool all
|
||||
(
|
||||
bool const & x,
|
||||
bool const & y
|
||||
bool const & x
|
||||
)
|
||||
{
|
||||
return x && y;
|
||||
return x;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool not_
|
||||
|
|
|
@ -135,10 +135,8 @@ int test_any()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
Error += glm::any(true, true) ? 0 : 1;
|
||||
Error += glm::any(true, false) ? 0 : 1;
|
||||
Error += glm::any(false, true) ? 0 : 1;
|
||||
Error += glm::any(false, false) ? 1 : 0;
|
||||
Error += glm::any(true) ? 0 : 1;
|
||||
Error += glm::any(false) ? 1 : 0;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
@ -147,10 +145,8 @@ int test_all()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
Error += glm::all(true, true) ? 0 : 1;
|
||||
Error += glm::all(true, false) ? 1 : 0;
|
||||
Error += glm::all(false, true) ? 1 : 0;
|
||||
Error += glm::all(false, false) ? 1 : 0;
|
||||
Error += glm::all(true) ? 0 : 1;
|
||||
Error += glm::all(false) ? 1 : 0;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue