Continue to tweak death effects

This commit is contained in:
2022-06-04 15:52:38 +01:00
parent 63af928a1a
commit 582881ca66
13 changed files with 126 additions and 27 deletions
+7
View File
@@ -68,6 +68,13 @@ dotV (V2 x y) (V2 z w) = x*z + y*w
argV :: Point2 -> Float
{-# INLINE argV #-}
argV (V2 x y) = normalizeAngle $ atan2 y x
{- | Given vector, returns the angle, anticlockwise from +ve x-axis, in radians.
Returns Nothing for a 0 0 vector. -}
safeArgV :: Point2 -> Maybe Float
{-# INLINE safeArgV #-}
safeArgV (V2 0 0) = Nothing
safeArgV v = Just $ argV v
{- | Determinant of the matrix formed by two vectors. -}
detV :: Point2 -> Point2 -> Float
{-# INLINE detV #-}