diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2024-07-28 18:24:22 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2024-07-28 18:24:22 +0200 |
| commit | c3c8381b5d376263f4b14ea3e5328f7ab8ad2142 (patch) | |
| tree | 3365e8a1f8877c25084e7c86072617ff7f498716 /ride/climb.go | |
| parent | 406625f7074233b381c3e01de751250d05b04f9d (diff) | |
test: Add failing test for climb inside long false flat
Diffstat (limited to 'ride/climb.go')
| -rw-r--r-- | ride/climb.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ride/climb.go b/ride/climb.go index bf1dfc9..3b3d6dc 100644 --- a/ride/climb.go +++ b/ride/climb.go @@ -98,7 +98,7 @@ func climbsBetween(points []Point, start int, end int) []Climb { } } // TODO: Use descent to reduce recursion - if highest == start { + if points[highest].distance-points[start].distance < ClimbDistanceMinimum { return climbsBetween(points, start+1, end) } climb := bestClimbBetween(points, start, highest) |