mirror of
https://github.com/g-truc/glm.git
synced 2024-11-25 18:04:34 +00:00
Added rotate test
This commit is contained in:
parent
8f12f96787
commit
ef9f9f8028
@ -36,12 +36,26 @@ static int test_scale()
|
||||
return Error;
|
||||
}
|
||||
|
||||
static int test_rotate()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::vec4 const A(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
glm::mat4 const R = glm::rotate(glm::mat4(1.0f), glm::radians(90.f), glm::vec3(0, 0, 1));
|
||||
glm::vec4 const B = R * A;
|
||||
Error += glm::all(glm::equal(B, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.0001f)) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_translate();
|
||||
Error += test_scale();
|
||||
Error += test_rotate();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user