Add simdMat4 static constants
- Tests, too
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_STATIC_CONST_MEMBERS
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
@@ -252,6 +253,15 @@ int test_compute_gtx()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_static_const() {
|
||||
int Error(0);
|
||||
|
||||
Error += glm::simdMat4(1) == glm::simdMat4::IDENTITY ? 0 : 1;
|
||||
Error += glm::simdMat4(0) == glm::simdMat4::ZERO ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
@@ -313,7 +323,7 @@ int main()
|
||||
|
||||
Error += test_compute_glm();
|
||||
Error += test_compute_gtx();
|
||||
|
||||
Error += test_static_const();
|
||||
float Det = glm::determinant(glm::simdMat4(1.0));
|
||||
Error += Det == 1.0f ? 0 : 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user