VEC: use *** arrow to simplify

This commit is contained in:
hasufell 2014-12-13 04:05:28 +01:00
parent c6ca5fa7da
commit afe35829cd
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
module Algebra.Vector where
import Control.Applicative
import Control.Arrow ((***))
import Data.List (sortBy)
import Diagrams.TwoD.Types
import Graphics.Gloss.Geometry.Line
@ -96,8 +97,8 @@ intersectSeg' (a, b) (c, d) =
(ptToGloss c)
(ptToGloss d)
where
ptToGloss = (\(x, y) -> (double2Float x, double2Float y)) <$> unp2
glossToPt = p2 . (\(x, y) -> (float2Double x, float2Double y))
ptToGloss = (double2Float *** double2Float) <$> unp2
glossToPt = p2 . (float2Double *** float2Double)
-- |Get the orientation of 3 points which can either be