mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
Fix GTC_matrix_transform test for C++98
This commit is contained in:
parent
ed1059731f
commit
820557cf31
@ -15,8 +15,8 @@ int test_perspective()
|
|||||||
|
|
||||||
Projection = glm::perspectiveLH_ZO(glm::pi<float>() * 0.25f, 4.0f / 3.0f, Near, Far);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, 0.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, -1.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, 0.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, -1.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, 0.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, -1.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, 0.f, Eps);
|
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);
|
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 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 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f);
|
||||||
N /= N.w;
|
N /= N.w;
|
||||||
F /= F.w;
|
F /= F.w;
|
||||||
Error += glm::notEqual(N.z, -1.f, Eps);
|
Error += glm::notEqual(N.z, -1.f, Eps);
|
||||||
|
Loading…
Reference in New Issue
Block a user