Add options page scrolling

This commit is contained in:
2022-06-25 09:28:45 +01:00
parent 3c2df2542a
commit dd0afc6166
12 changed files with 74 additions and 44 deletions
+5
View File
@@ -4,6 +4,7 @@ module Geometry.Zone
, ddaExt'
, ddaSq
, ddaSqStream
, ddaStream
) where
import Geometry.Data
@@ -127,6 +128,10 @@ ddaExt' s sp@(V2 sx sy) ep@(V2 ex ey)
[y1 .. y2]
| otherwise = zip (map (divTo s) [y2x,y2x+xdy..])
[y2-1 .. y1-1]
ddaStream :: Float -> Point2 -> Point2 -> Stream (Of (V2 Int)) Identity ()
ddaStream s sp _ -- @(V2 sx sy) ep@(V2 ex ey)
= S.yield $ sizeZoneOfPoint' s sp
-- | Determines which horizontal and vertical lines on a grid are crossed by a
-- line. For each adds the x-y index of the square to the right or above the
-- crossed grid line. Also adds the index of the square containing the start