From 3d044a1f388c12175022ef0712471871f0f0d308 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 7 Apr 2023 22:56:03 +0200 Subject: [PATCH] refactor(example): not needed explicit construction removed from `glide_distance()` --- example/glide_computer/glide_computer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/glide_computer/glide_computer.cpp b/example/glide_computer/glide_computer.cpp index 250d89b7..25cef4c2 100644 --- a/example/glide_computer/glide_computer.cpp +++ b/example/glide_computer/glide_computer.cpp @@ -61,8 +61,8 @@ altitude terrain_level_alt(const task& t, const flight_point& pos) distance glide_distance(const flight_point& pos, const glider& g, const task& t, const safety& s, altitude ground_alt) { const auto dist_to_finish = t.get_length() - pos.dist; - return distance(quantity_cast(ground_alt + s.min_agl_height - pos.alt) / - ((ground_alt - t.get_finish().alt) / dist_to_finish - 1 / glide_ratio(g.polar[0]))); + return quantity_cast(ground_alt + s.min_agl_height - pos.alt) / + ((ground_alt - t.get_finish().alt) / dist_to_finish - 1 / glide_ratio(g.polar[0])); } } // namespace glide_computer