Fixed glm::to_string on quaternions wrong components order #681

This commit is contained in:
Christophe Riccio
2017-09-20 14:29:22 +02:00
parent 1bf24f8344
commit a2497e6174
3 changed files with 22 additions and 8 deletions

View File

@@ -117,11 +117,24 @@ int test_string_cast_matrix()
return Error;
}
int test_string_cast_quaternion()
{
int Error = 0;
glm::quat Q0 = glm::quat(1.0f, 2.0f, 3.0f, 4.0f);
std::string S0 = glm::to_string(Q0);
Error += S0 != std::string("quat(1.000000, {2.000000, 3.000000, 4.000000})") ? 1 : 0;
return Error;
}
int main()
{
int Error = 0;
Error += test_string_cast_vector();
Error += test_string_cast_matrix();
Error += test_string_cast_quaternion();
return Error;
}