From 2cbdc8f7883c540b5645f3d1937f2f7eabac55ae Mon Sep 17 00:00:00 2001 From: Blake-Madden Date: Sun, 24 Sep 2023 20:27:53 -0400 Subject: [PATCH] Remove unused variable --- src/math/mathematics.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/math/mathematics.h b/src/math/mathematics.h index 60d0ed76..74685b59 100644 --- a/src/math/mathematics.h +++ b/src/math/mathematics.h @@ -572,9 +572,7 @@ namespace geometry { assert(segmentRatio >= 0 && segmentRatio <= 1.0 && "segmentRatio must be between 0 and 1!"); segmentRatio = std::clamp(segmentRatio, 0.0, 1.0); - // distance - const auto distance = std::sqrt(std::pow(pt2.first - pt1.first, 2.0) + - std::pow(pt2.second - pt1.second, 2.0)); + // find point that divides the segment const auto newX = (segmentRatio * pt2.first) + ((1 - segmentRatio) * pt1.first); // into the ratio(1 - r) : r