Class: LineSegment

LineSegment(point1, point2)

class LineSegment, a line with two end points.

Constructor

new LineSegment(point1, point2)

Parameters:
Name Type Description
point1 Point the first end point of the line segment
point2 Point the second send point of the line segment
Source:

Members

angle

the angle made by the line segment with the horizontal
Source:

dx

the horizontal run of the line segment
Source:

dy

the vertical rise of the line segment
Source:

length

the length of the line segment
Source:

midpoint

the mid-point of the line segment
Source:

slope

the slope of the line segment, as in rise over run, i.e. dy/dx
Source: