diff --git a/test/ext/ext_matrix_transform.cpp b/test/ext/ext_matrix_transform.cpp index 4158dcda..cf653b7d 100644 --- a/test/ext/ext_matrix_transform.cpp +++ b/test/ext/ext_matrix_transform.cpp @@ -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; }