Skip to content

Removed unnecessary code to handle start point in lineSliceAlong()#1631

Merged
jush merged 2 commits intomainfrom
rs/line-slice-start-point
Feb 6, 2026
Merged

Removed unnecessary code to handle start point in lineSliceAlong()#1631
jush merged 2 commits intomainfrom
rs/line-slice-start-point

Conversation

@jush
Copy link
Member

@jush jush commented Feb 2, 2026

Removed code which could never occur when calculating the initial point in lineSliceAlong().

Given that travelled > startDist then double overshot = startDist - travelled could never be 0.

Also added a test to validate when travelled == stopDist.

@jush jush self-assigned this Feb 2, 2026
@jush jush requested a review from a team as a code owner February 2, 2026 19:51
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.35%. Comparing base (26a10e0) to head (a62f863).
⚠️ Report is 1 commits behind head on main.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1631      +/-   ##
============================================
+ Coverage     79.23%   79.35%   +0.11%     
- Complexity     1128     1129       +1     
============================================
  Files           162      162              
  Lines          4701     4698       -3     
  Branches        660      659       -1     
============================================
+ Hits           3725     3728       +3     
+ Misses          706      702       -4     
+ Partials        270      268       -2     
Files with missing lines Coverage Δ
...s-turf/src/main/java/com/mapbox/turf/TurfMisc.java 88.69% <ø> (+3.31%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

DzmitryFomchyn
DzmitryFomchyn previously approved these changes Feb 5, 2026
@jush jush force-pushed the rs/line-slice-start-point branch from 6c24e12 to a62f863 Compare February 6, 2026 06:52
@jush jush enabled auto-merge (squash) February 6, 2026 06:52
@jush jush requested a review from DzmitryFomchyn February 6, 2026 07:09
@jush jush merged commit 53a24f5 into main Feb 6, 2026
4 of 5 checks passed
@jush jush deleted the rs/line-slice-start-point branch February 6, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants