Fix bug in intersectCircSeg

This commit is contained in:
2021-12-15 17:47:41 +00:00
parent adab32bf68
commit 9dadea2c36
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ inSegArea a b c = param >= 0 && param <= dotV (b -.- a) (b -.- a)
intersectCircSeg :: Point2 -> Float -> Point2 -> Point2 -> [Point2]
intersectCircSeg c r a b
| y < 0 = []
| otherwise = nub $ filter (inSegArea a b) [ d -.- v, d +.+ c ]
| otherwise = nub $ filter (inSegArea a b) [ d -.- v, d +.+ v ]
where
d = closestPointOnLine a b c
x = dist d c