geom2d-0.2.2: package for geometry in euklidean 2d space

Geom2d.Line.Internal

Description

This module defines the internals of a line. You probably won't need this module when using the geomtry libary.

Synopsis

# Documentation

data InfLine p a Source

This type modells a infinite line.

Constructors

 InfLine (p a) (p a)

Instances

 Functor p => Functor (InfLine p) Source `InfLine` is a `Functor` where the function is mapped over both points which define the `InfLine`. Translate p => Translate (InfLine p) Source Translate a line by a given vector. (Point p, Eq a, Fractional a) => Intersect (p a) (InfLine p a) Source (Eq (p a), Eq a, RealFloat a, Num (p a), Point p) => Eq (InfLine p a) Source Two lines are equal when they have the same root and the same slope. If the two lines do not have a root, that means that the lines are parallel to the x-axis. In this case we compare their y-value. Read (p a) => Read (InfLine p a) Source Show (p a) => Show (InfLine p a) Source (Eq (p a), Arbitrary (p a)) => Arbitrary (InfLine p a) Source This `Arbitrary` instance should only produce valid `InfLine`s. (Point p, Eq a, Fractional a) => Intersect (InfLine p a) (p a) Source (Eq (p a), Point p, Num (p a), RealFloat a) => Intersect (FinLine p a) (InfLine p a) Source (Eq (p a), Point p, Num (p a), RealFloat a) => Intersect (InfLine p a) (FinLine p a) Source (Eq (p a), Num (p a), Num a, RealFloat a, Point p) => Intersect (InfLine p a) (InfLine p a) Source

data FinLine p a Source

Modells a finite line stretching between two points.

Constructors

 FinLine (p a) (p a) We expect the two points to be different

Instances

 Point p => Distance p (FinLine p) Source Translate p => Translate (FinLine p) Source Translate a `FinLine` by a fiven vector Point p => Distance (FinLine p) p Source Eq (p a) => Eq (FinLine p a) Source Two lines are equal if their end points are equal.`FinLine a b == FinLine b a` Read (p a) => Read (FinLine p a) Source Show (p a) => Show (FinLine p a) Source (Eq (p a), Arbitrary (p a)) => Arbitrary (FinLine p a) Source This `Arbitrary` instance should only produce valid `FinLine`s. AEq (p a) => AEq (FinLine p a) Source Two lines are almost equal if their ending points are almost equal. (Eq (p a), Point p, Num (p a), RealFloat a) => Intersect (FinLine p a) (InfLine p a) Source (Eq (p a), Point p, Num (p a), RealFloat a) => Intersect (FinLine p a) (FinLine p a) Source (Point p, RealFloat a, Ord a, Eq (p a)) => Intersect (FinLine p a) (Shape p a) Source (RealFloat a, Eq a, Eq (p a), Point p) => Intersect (FinLine p a) (Polygon p a) Source (Distance p (FinLine p), Floating a, Ord a) => Intersect (FinLine p a) (Circle p a) Source (Eq (p a), Point p, Num (p a), RealFloat a) => Intersect (InfLine p a) (FinLine p a) Source (Point p, RealFloat a, Ord a, Eq (p a)) => Intersect (Shape p a) (FinLine p a) Source (RealFloat a, Eq a, Eq (p a), Point p) => Intersect (Polygon p a) (FinLine p a) Source (Distance p (FinLine p), Floating a, Ord a) => Intersect (Circle p a) (FinLine p a) Source