Skip to content

Commit

Permalink
Fix GTC_matrix_transform test for C++98
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe committed Dec 21, 2023
1 parent ed10597 commit b728f53
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/gtc/gtc_matrix_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ int test_perspective()

Projection = glm::perspectiveLH_ZO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near, Far);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Far, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, 0.f, Eps);
Expand All @@ -25,8 +25,8 @@ int test_perspective()

Projection = glm::perspectiveLH_NO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near, Far);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Far, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, -1.f, Eps);
Expand All @@ -35,8 +35,8 @@ int test_perspective()

Projection = glm::perspectiveRH_ZO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near, Far);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Far, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, 0.f, Eps);
Expand All @@ -45,8 +45,8 @@ int test_perspective()

Projection = glm::perspectiveRH_NO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near, Far);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Far, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, -1.f, Eps);
Expand All @@ -68,8 +68,8 @@ int test_infinitePerspective()

Projection = glm::infinitePerspectiveLH_ZO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Inf, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, 0.f, Eps);
Expand All @@ -78,8 +78,8 @@ int test_infinitePerspective()

Projection = glm::infinitePerspectiveLH_NO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Inf, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, -1.f, Eps);
Expand All @@ -88,8 +88,8 @@ int test_infinitePerspective()

Projection = glm::infinitePerspectiveRH_ZO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Inf, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, 0.f, Eps);
Expand All @@ -98,8 +98,8 @@ int test_infinitePerspective()

Projection = glm::infinitePerspectiveRH_NO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near);
{
glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f};
glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Inf, 1.f};
glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f);
glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f);
N /= N.w;
F /= F.w;
Error += glm::notEqual(N.z, -1.f, Eps);
Expand Down

0 comments on commit b728f53

Please sign in to comment.