Skip to content

Commit 806b29d

Browse files
committed
add minInt
1 parent f95a09a commit 806b29d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

v2/blob/line_cross.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ func maxInt(x, y int) int {
1515
return y
1616
}
1717

18+
func minInt(x, y int) int {
19+
if x < y {
20+
return x
21+
}
22+
return y
23+
}
24+
1825
// isOnSegment Checks if point Q lies on segment PR
1926
// Input: three colinear points Q, Q and R
2027
func isOnSegment(Px, Py, Qx, Qy, Rx, Ry int) bool {

0 commit comments

Comments
 (0)