round speed to 1 decimal place

This commit is contained in:
karenzshea
2017-02-13 11:06:38 +01:00
committed by Patrick Niklaus
parent 07a1a907f8
commit d3c2ac671f
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -418,7 +418,7 @@ BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance)
auto speed = speeds[i].get<json::Number>().value;
auto duration = durations[i].get<json::Number>().value;
auto distance = distances[i].get<json::Number>().value;
BOOST_CHECK_EQUAL(speed, distance / duration);
BOOST_CHECK_EQUAL(speed, std::round(distance / duration * 10.) / 10.);
}
}