Added vec2 cross #621

This commit is contained in:
Christophe Riccio
2017-04-08 19:37:20 +02:00
parent 96adec5f5e
commit 40398d67cd
5 changed files with 83 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ glmCreateTestGTC(gtx_component_wise)
glmCreateTestGTC(gtx_euler_angle)
glmCreateTestGTC(gtx_extend)
glmCreateTestGTC(gtx_extended_min_max)
glmCreateTestGTC(gtx_exterior_product)
glmCreateTestGTC(gtx_fast_exponential)
glmCreateTestGTC(gtx_fast_square_root)
glmCreateTestGTC(gtx_fast_trigonometry)

View File

@@ -0,0 +1,14 @@
#include <glm/gtx/exterior_product.hpp>
#include <glm/gtc/epsilon.hpp>
#include <glm/vec2.hpp>
int main()
{
int Error = 0;
float const f = glm::cross(glm::vec2(1.0f, 1.0f), glm::vec2(1.0f, 1.0f));
Error += glm::epsilonEqual(f, 0.0f, 0.001f) ? 0 : 1;
return Error;
}