Skip to content

Commit

Permalink
D.TwoD.Shapes bug fix: 1/n @@ turn instead of 1/n for defining regula…
Browse files Browse the repository at this point in the history
…r polygons
  • Loading branch information
Brent Yorgey committed Jan 14, 2014
1 parent 3a2e269 commit 10cae4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Diagrams/TwoD/Shapes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import Diagrams.TwoD.Types

import Diagrams.Util

import Control.Lens (makeLenses, op, (.~), (^.), (&))
import Control.Lens (makeLenses, op, (&), (.~), (^.))
import Data.Default.Class
import Data.Semigroup

Expand Down Expand Up @@ -140,7 +140,7 @@ rect w h = trailLike . head . op Path $ unitSquare # scaleX w # scaleY h
regPoly :: (TrailLike t, V t ~ R2) => Int -> Double -> t
regPoly n l = polygon (def & polyType .~
PolySides
(repeat (1/ fromIntegral n))
(repeat (1/fromIntegral n @@ turn))
(replicate (n-1) l)
& polyOrient .~ OrientH
)
Expand Down

0 comments on commit 10cae4c

Please sign in to comment.