From 685b33980cc7a346574b24732464f0cbe3115a1f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 15 Nov 2023 01:29:24 +0000 Subject: Switch to millimeters for spatial units Mostly a case of changing far too many magic numbers, something else to fix I guess. I probably missed something. Also there's some hackery when loading 3D models, which are still assumed to be in metres. --- test/test-geo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/test-geo.cpp') diff --git a/test/test-geo.cpp b/test/test-geo.cpp index 9874fb7..7404d32 100644 --- a/test/test-geo.cpp +++ b/test/test-geo.cpp @@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(initialize) BOOST_CHECK_EQUAL(size, glm::uvec2(41, 46)); BOOST_CHECK_EQUAL(nodes.size(), 1886); BOOST_CHECK(std::all_of(nodes.begin(), nodes.end(), [](const auto & n) { - return n.height == -1.5F; + return n.height == -1500.F; })); } @@ -63,12 +63,12 @@ BOOST_AUTO_TEST_CASE(gen_random) })); // Still an island for (int x = limit.first.x; x <= limit.second.x; x += 1) { - BOOST_CHECK_EQUAL(nodes[at(x, limit.first.y)].height, -1.5F); - BOOST_CHECK_EQUAL(nodes[at(x, limit.second.y)].height, -1.5F); + BOOST_CHECK_EQUAL(nodes[at(x, limit.first.y)].height, -1500.F); + BOOST_CHECK_EQUAL(nodes[at(x, limit.second.y)].height, -1500.F); } for (int y = limit.first.y; y <= limit.second.y; y += 1) { - BOOST_CHECK_EQUAL(nodes[at(limit.first.x, y)].height, -1.5F); - BOOST_CHECK_EQUAL(nodes[at(limit.second.x, y)].height, -1.5F); + BOOST_CHECK_EQUAL(nodes[at(limit.first.x, y)].height, -1500.F); + BOOST_CHECK_EQUAL(nodes[at(limit.second.x, y)].height, -1500.F); } } -- cgit v1.2.3