Implement slowed down aim turning
This commit is contained in:
+3
-2
@@ -168,8 +168,9 @@ nRaysRad n x = take n $ iterate (rotateV (2*pi/fromIntegral n)) (V2 x 0)
|
||||
-- smallest change in rotation between them.
|
||||
-- This appears to sometimes fail if the angles are not normalized.
|
||||
isLeftOfA :: Float -> Float -> Bool
|
||||
isLeftOfA angle1 angle2 = (angle1 - angle2 < pi && angle1 > angle2)
|
||||
|| (angle2 - angle1 > pi && angle2 > angle1)
|
||||
--isLeftOfA angle1 angle2 = (angle1 - angle2 < pi && angle1 > angle2)
|
||||
-- || (angle2 - angle1 > pi && angle2 > angle1)
|
||||
isLeftOfA angle1 angle2 = normalizeAngle (angle1 - angle2) < pi
|
||||
-- | Test whether a vector is to the left of another, according to the smallest
|
||||
-- change of rotation between them.
|
||||
isLeftOf :: Point2 -> Point2 -> Bool
|
||||
|
||||
Reference in New Issue
Block a user