Skip to content

Commit

Permalink
fix negative index return
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Jan 31, 2025
1 parent 7e40345 commit 1461bd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ private int getPositionIndexFromCoordinate(float[] positions, double coord, floa
}
}

return j - 1;
return Math.max(0, j - 1);
}

/**
Expand Down

0 comments on commit 1461bd4

Please sign in to comment.