mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
Fix GTC_matrix_transform test for C++98
This commit is contained in:
parent
ed1059731f
commit
b728f5332a
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user