diff --git a/genstar/Main.hs b/genstar/Main.hs index 799dc8b..a948d3b 100644 --- a/genstar/Main.hs +++ b/genstar/Main.hs @@ -45,7 +45,7 @@ instance Show PolygonPath where -- | 'regularPolygonMod' @n@ @rf@ @pos@ -- creates a regular @n@-gon --- with the center at @pos@ +-- with the centre at @pos@ -- that is modified in the sense that it takes @rf@, -- which is used to set the radius for each individual point. regularPolygonMod :: Integer -> (Integer -> Double) -> Vertex -> PolygonPath @@ -54,7 +54,7 @@ regularPolygonMod n rf pos = PolygonPath (map (\step -> move pos $ scale (rf ste -- | 'regularPolygon' @n@ @r@ @pos@ -- creates a regular polygon -- with the radius @r@ --- and the center at @pos@. +-- and the centre at @pos@. regularPolygon :: Integer -> Double -> Vertex -> PolygonPath regularPolygon n r = regularPolygonMod n (const r) @@ -63,7 +63,7 @@ regularPolygon n r = regularPolygonMod n (const r) -- with @n@ spikes, -- the inner radius @r1@, -- the outer radius @r2@ --- and the center @pos@. +-- and the centre @pos@. star :: Integer -> Double -> Double -> Vertex -> PolygonPath star n r1 r2 = regularPolygonMod (n * 2) ((take (fromInteger n * 2) (cycle [r1, r2]) !!) . fromInteger)