Skip to content

Commit

Permalink
Remove redundant scaling factor (the values are set to a fixed range
Browse files Browse the repository at this point in the history
shortly after this code executes)
  • Loading branch information
nyalldawson committed Dec 27, 2019
1 parent 49dccd8 commit cb62685
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/pal/costcalculator.cpp
Expand Up @@ -116,8 +116,7 @@ void CostCalculator::calculateCandidatePolygonRingDistanceCosts( std::vector< st
double maxCandidateRingDistanceCost = std::numeric_limits< double >::lowest();
for ( std::unique_ptr< LabelPosition > &pos : lPos )
{
// 4* multiplier came from original pal library logic - TODO: evaluate if this is still appropriate
const double candidatePolygonRingDistanceCost = 4 * calculatePolygonRingDistance( pos.get(), obstacles, bbx, bby );
const double candidatePolygonRingDistanceCost = calculatePolygonRingDistance( pos.get(), obstacles, bbx, bby );

minCandidateRingDistanceCost = std::min( minCandidateRingDistanceCost, candidatePolygonRingDistanceCost );
maxCandidateRingDistanceCost = std::max( maxCandidateRingDistanceCost, candidatePolygonRingDistanceCost );
Expand Down

0 comments on commit cb62685

Please sign in to comment.