Skip to content

Commit

Permalink
comment explaining why one line isn't covered by a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbj42 committed Jul 24, 2018
1 parent 969fa69 commit 52972f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/field-of-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ function cutWedge(wedges: number[], wedgeIndex: number, low: number, high: numbe
if (low <= wedges[wedgeIndex + WEDGE_HIGH]) {
break;
}
// This next line is to cover a hypothetical edge case, where two slopes
// are not the same, but are within the BODY_EPSILON distance. That
// would be due to either floating point error or due to a very large
// field radius. Either way I haven't been able to construct a test
// case for it.
wedgeIndex += WEDGE_COUNT;
}
if (low <= wedges[wedgeIndex + WEDGE_LOW]) {
Expand Down

0 comments on commit 52972f6

Please sign in to comment.