Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Commit

Permalink
Using the .+^ function instead of doing complex math
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakjois committed Apr 8, 2012
1 parent 370564c commit 5b1c8a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Diagrams/TwoD/Path/Turtle/Internal.hs
Expand Up @@ -29,7 +29,7 @@ module Diagrams.TwoD.Path.Turtle.Internal
, getTurtleDiagram
) where

import Debug.Trace (traceShow)
-- import Debug.Trace (traceShow)

import Diagrams.Prelude
import Data.Colour hiding (atop)
Expand Down Expand Up @@ -100,7 +100,7 @@ moveTurtle s t@(Turtle pd pos h (o, Trail xs _) _ _) =
rotatedSeg = rotate h s
newTrail = rotatedSeg : xs
-- Calculate the new position along the segment
newPenPos = flip fAtParam 1 . mkFixedSeg pos $ rotatedSeg
newPenPos = pos .+^ segOffset rotatedSeg

-- | Move the turtle forward by @x@ units
forward :: Double -- ^ Distance to move
Expand Down

0 comments on commit 5b1c8a8

Please sign in to comment.