Skip to content

Commit

Permalink
Merge pull request #5 from wmamrak/main
Browse files Browse the repository at this point in the history
Remove redundant operations from PathCost private constructor.
  • Loading branch information
rhysgoldstein authored May 21, 2024
2 parents 9c1bdb3 + 3123c40 commit 107ef6e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/central64/grid/PathCost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ constexpr PathCost::PathCost(double distance)
}

constexpr PathCost::PathCost(int64_t multiplier, int)
: multiplier_{ (multiplier >= 0) ? (multiplier >= max) ? max :
int64_t(multiplier + 0.5) :
(multiplier <= -max) ? -max :
-int64_t(-multiplier + 0.5) }
: multiplier_{ (multiplier >= max) ? max :
(multiplier <= -max) ? -max :
multiplier }
{
}

Expand Down

0 comments on commit 107ef6e

Please sign in to comment.