From afe35829cd4e38b56a97809483f8966ad193df00 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sat, 13 Dec 2014 04:05:28 +0100 Subject: [PATCH] VEC: use *** arrow to simplify --- Algebra/Vector.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Algebra/Vector.hs b/Algebra/Vector.hs index 7ba5b52..20d3d73 100644 --- a/Algebra/Vector.hs +++ b/Algebra/Vector.hs @@ -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