Skip to content

Commit 2702b77

Browse files
HugoNumworksEmilieNumworks
authored andcommitted
[apps/shared] Improve discontinuity detection with strict comparison
1 parent 09dd52c commit 2702b77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/shared/curve_view.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,8 @@ void CurveView::drawHistogram(KDContext * ctx, KDRect rect, EvaluateYForX yEvalu
826826
}
827827

828828
static bool pointInBoundingBox(float x1, float y1, float x2, float y2, float xC, float yC) {
829-
return ((x1 <= xC && xC <= x2) || (x2 <= xC && xC <= x1))
830-
&& ((y1 <= yC && yC <= y2) || (y2 <= yC && yC <= y1));
829+
return ((x1 < xC && xC < x2) || (x2 < xC && xC < x1) || (x2 == xC && xC == x1))
830+
&& ((y1 < yC && yC < y2) || (y2 < yC && yC < y1) || (y2 == yC && yC == y1));
831831
}
832832

833833
void CurveView::joinDots(KDContext * ctx, KDRect rect, EvaluateXYForFloatParameter xyFloatEvaluation , void * model, void * context, bool drawStraightLinesEarly, float t, float x, float y, float s, float u, float v, KDColor color, bool thick, int maxNumberOfRecursion, EvaluateXYForDoubleParameter xyDoubleEvaluation) const {

0 commit comments

Comments
 (0)