`startPoint`is equal to the

`endPoint`.

**Type** Line2D

**Namespace** MathNet.Spatial.Euclidean

**Parent** ValueType

**Interfaces** IEquatable<Line2D>, IXmlSerializable

This structure represents a line between two points in 2-space. It allows for operations such as
computing the length, direction, projections to, comparisons, and shifting by a vector.

- ClosestPointTo
- Equals
- Equals
- GetHashCode
- GetType
- IntersectWith
- IntersectWith
- IsParallelTo
- IsParallelTo
- LineTo
- ToString

Returns the closest point on the line to the given point.
##### Parameters

`Point2D`

pThe point that the returned point is the closest point on the line to

`bool`

mustBeOnSegmentIf true the returned point is contained by the segment ends, otherwise it can be anywhere on the projected line

Compute the intersection between two lines with parallelism considered by the double floating point precision
on the cross product of the two directions.
##### Return

`Nullable<Point2D>`

The point at the intersection of two lines, or null if the lines are parallel.

Compute the intersection between two lines if the angle between them is greater than a specified
angle tolerance.
##### Parameters

##### Return

`Line2D`

otherThe other line to compute the intersection with

`Angle`

toleranceThe tolerance used when checking if the lines are parallel

`Nullable<Point2D>`

The point at the intersection of two lines, or null if the lines are parallel.

Checks to determine whether or not two lines are parallel to each other, using the dot product within
the double precision specified in the MathNet.Numerics package.
##### Return

`bool`

True if the lines are parallel, false if they are not

Checks to determine whether or not two lines are parallel to each other within a specified angle tolerance
##### Parameters

##### Return

`Line2D`

otherThe other line to check this one against

`Angle`

toleranceIf the angle between line directions is less than this value, the method returns true

`bool`

True if the lines are parallel within the angle tolerance, false if they are not

Gets a normalized vector in the direction from StartPoint to EndPoint

The end point of the line segment

Gets the distance from StartPoint to EndPoint

The starting point of the line segment