Skip to content

Commit

Permalink
Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Sep 25, 2023
1 parent b679b10 commit 2cbdc8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/math/mathematics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2cbdc8f

Please sign in to comment.