Fix minigun
This commit is contained in:
+3
-3
@@ -38,6 +38,9 @@ alongSegBy :: Float -> Point2 -> Point2 -> Point2
|
||||
alongSegBy !x !a !b = a +.+ y *.* normalizeV (b -.- a)
|
||||
where
|
||||
y = min x $ dist a b
|
||||
|
||||
tweenPoints :: Float -> Point2 -> Point2 -> Point2
|
||||
tweenPoints = alongSegBy
|
||||
-- | Debug version of 'pointInPolygon'.
|
||||
errorPointInPolygon :: Int -> Point2 -> [Point2] -> Bool
|
||||
errorPointInPolygon !i !p xs
|
||||
@@ -115,9 +118,6 @@ difference x y
|
||||
reflectIn :: Point2 -> Point2 -> Point2
|
||||
reflectIn line vec = rotateV (2 * angleBetween line vec) vec
|
||||
|
||||
reflectIn' :: Point2 -> Point2 -> Point2
|
||||
reflectIn' line vec = rotateV (2 * angleBetween vec line) vec
|
||||
|
||||
-- | Find angle between two points.
|
||||
-- Not normalised, ranges from -2*pi to 2*pi.
|
||||
angleBetween :: Point2 -> Point2 -> Float
|
||||
|
||||
Reference in New Issue
Block a user