Skip to content

Commit

Permalink
bug fix: (1/2 @@ turn) instead of 1/2
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Yorgey committed Jan 14, 2014
1 parent aba8db0 commit abff596
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Diagrams/TwoD/Arrowheads.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ module Diagrams.TwoD.Arrowheads
) where

import Control.Lens (from, (&), (.~), (^.))
import Data.Default.Class
import Data.AffineSpace
import Data.Default.Class
import Data.Functor ((<$>))
import Data.Maybe (fromMaybe)
import Data.Monoid (mempty, (<>))
Expand Down Expand Up @@ -120,10 +120,12 @@ arrowheadDart theta = aHead
where
aHead size shaftWidth = (dartP # moveOriginTo (dartVertices !! 2), joint)
where
a = theta
r = htRadius * size
dartP = polygon (def & polyType .~ PolyPolar [a, 1/2 - a, 1/2 - a]
[r, r, 0.1 * size, r] & polyOrient .~ NoOrient)
dartP = polygon
( def & polyType .~ PolyPolar [theta, (1/2 @@ turn) - theta, (1/2 @@ turn) - theta]
[r, r, 0.1 * size, r]
& polyOrient .~ NoOrient
)
dartVertices = (concat . pathVertices) $ dartP
m = magnitude (dartVertices !! 1 .-. dartVertices !! 3)
s = 1 - shaftWidth / m
Expand Down

0 comments on commit abff596

Please sign in to comment.