Class: Line

Line(a, b)

new Line(a, b)

Creates an instance of Line.
Parameters:
Name Type Description
a Vertex The line's first point.
b Vertex The line's second point.
Source:

Methods

intersection(line) → {Vertex}

Get the intersection if this line and the specified line.
Parameters:
Name Type Description
line Line The second line.
Source:
Returns:
The intersection (may lie outside the end-points).
Type
Vertex

intersection(line) → {Vertex}

Get the intersection if this vector and the specified vector.
Parameters:
Name Type Description
line Vector The second vector.
Source:
Returns:
The intersection (may lie outside the end-points).
Type
Vertex

toSVGString(p) → {string}

Create an SVG representation of this line.
Parameters:
Name Type Description
p options A set of options, like the 'classname' to use for the line object.
Source:
Returns:
The SVG string representing this line.
Type
string