This commit is contained in:
2022-06-18 00:18:18 +01:00
parent a7c03671d3
commit 6a095d3de6
12 changed files with 49 additions and 36 deletions
+2 -5
View File
@@ -11,13 +11,10 @@ isLHS
-> Point2 -- ^ Point not on line.
-> Bool
{-# INLINE isLHS #-}
isLHS
(V2 x y)
(V2 x' y')
(V2 x'' y'')
isLHS (V2 x y) (V2 x' y') (V2 x'' y'')
| (x,y) == (x',y') = False
| otherwise = a1 * b2 - a2 * b1 > 0
where
where
a1 = x' - x
a2 = y' - y
b1 = x'' - x