module Numeric.Geometric.Primitives where type Vector2 a = (a,a) type LineSegment a = (a,a) lOrigin :: LineSegment a -> a lOrigin = fst lDestination :: LineSegment a -> a lDestination = snd flipLine :: LineSegment a -> LineSegment a flipLine (a,b) = (b,a) data IntersectionPoint = Endpoint0 | Endpoint1 | Between deriving (Eq,Read,Show,Enum) type IntersectionPair = (IntersectionPoint,IntersectionPoint) data LineIntersection = Coincident | Parallel | NINP -- ^ Not intersecting and not parallel | Intersecting IntersectionPair deriving (Eq,Show,Read) data Slope = ZeroSlope | UndefinedSlope | NegativeSlope | PositiveSlope deriving (Eq,Read,Show)