Skip to content

Commit 5b46340

Browse files
committed
breaking error
1 parent 806b29d commit 5b46340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v2/blob/line_cross.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func minInt(x, y int) int {
2525
// isOnSegment Checks if point Q lies on segment PR
2626
// Input: three colinear points Q, Q and R
2727
func isOnSegment(Px, Py, Qx, Qy, Rx, Ry int) bool {
28-
if Qx <= maxInt(Px, Rx) && Qx >= maxInt(Px, Rx) && Qy <= maxInt(Py, Ry) && Qy >= maxInt(Py, Ry) {
28+
if Qx <= maxInt(Px, Rx) && Qx >= minInt(Px, Rx) && Qy <= maxInt(Py, Ry) && Qy >= minInt(Py, Ry) {
2929
return true
3030
}
3131
return false

0 commit comments

Comments
 (0)