Refactor ai
This commit is contained in:
@@ -268,6 +268,7 @@ nRaysRad n x = take n $ iterate (rotateV (2*pi/fromIntegral n)) (x,0)
|
||||
|
||||
-- | Test whether an angle is to the left of another angle, according to the
|
||||
-- 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)
|
||||
|
||||
Reference in New Issue
Block a user