mirror of
https://github.com/g-truc/glm.git
synced 2025-04-11 07:46:36 +00:00
Add simple test for vec_swizzle
This commit is contained in:
parent
8afe61e9e5
commit
a81871a8a4
1 changed files with 21 additions and 0 deletions
|
@ -6,6 +6,27 @@ int main()
|
|||
int Error = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
glm::ivec2 const v(1, 2);
|
||||
Error += xx(v).x != xx(v).y;
|
||||
Error += yy(v).x != yy(v).y;
|
||||
}
|
||||
|
||||
{
|
||||
glm::ivec3 const v(1, 2, 3);
|
||||
Error += zyx(v) != glm::ivec3(3, 2, 1);
|
||||
}
|
||||
|
||||
{
|
||||
glm::ivec4 const v(1, 2, 3, 4);
|
||||
Error += wwww(v) != glm::ivec4(4);
|
||||
Error += wzyx(v) != glm::ivec4(4,3,2,1);
|
||||
|
||||
}
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue