From f3d792897a5dcaee81cc0b56f29eeb6fbed83cd7 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Wed, 22 Jun 2022 10:40:49 -0400 Subject: [PATCH] use double precision floats in test --- tests/orbit_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/orbit_test.cpp b/tests/orbit_test.cpp index bd99ccd..5017e85 100644 --- a/tests/orbit_test.cpp +++ b/tests/orbit_test.cpp @@ -82,12 +82,12 @@ TEST_CASE("orbital elements to state vectors, example 3.2", "[orbits]") REQUIRE_THAT(M[2][2], WithinAbs( 0.4478, 1e-4)); // rotate perifocal state vectors to IJK coordinates - glm::vec3 r_pos = M * pos; + glm::dvec3 r_pos = M * pos; REQUIRE_THAT(r_pos.x, WithinAbs(-4394.0, 0.2)); REQUIRE_THAT(r_pos.y, WithinAbs( 1410.3, 0.1)); REQUIRE_THAT(r_pos.z, WithinAbs(-5647.7, 0.1)); - glm::vec3 r_vel = M * vel; + glm::dvec3 r_vel = M * vel; REQUIRE_THAT(r_vel.x, WithinAbs(-8.2715, 0.1)); REQUIRE_THAT(r_vel.y, WithinAbs(-4.3852, 0.1)); REQUIRE_THAT(r_vel.z, WithinAbs( 2.5794, 0.1));