Constructor
new Line(begin, end)
Name | Type | Description |
---|---|---|
begin | Point2D | A Point2D representing the beginning of the line. |
end | Point2D | A Point2D representing the end of the line. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Line | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getBegin() → {Point2D}
Get the begin point of the line.
- Source
The beginning point of the line.
- Type:
- Point2D
getCentroid() → {Point2D}
Get the centroid of the line.
- Source
THe centroid point.
- Type:
- Point2D
getDeltaX() → {number}
Get the line delta in the X direction.
- Source
The delta in the X direction.
- Type:
- number
getDeltaY() → {number}
Get the line delta in the Y direction.
- Source
The delta in the Y direction.
- Type:
- number
getEnd() → {Point2D}
Get the end point of the line.
- Source
The ending point of the line.
- Type:
- Point2D
getInclination() → {number}
Get the inclination of the line.
- Source
The inclination of the line.
- Type:
- number
getIntercept() → {number}
Get the intercept of the line.
- Source
The slope of the line.
- Type:
- number
getLength() → {number}
Get the length of the line.
- Source
The length of the line.
- Type:
- number
getMidpoint() → {Point2D}
Get the mid point of the line.
- Source
The mid point of the line.
- Type:
- Point2D
getSlope() → {number}
Get the slope of the line.
- Source
The slope of the line.
- Type:
- number
getWorldLength(spacing2D) → {number}
Get the length of the line according to a spacing.
Name | Type | Description |
---|---|---|
spacing2D | Scalar2D | The 2D spacing. |
- Source
The length of the line with spacing or null for null spacings.
- Type:
- number
quantify(viewController) → {object}
Quantify a line according to view information.
Name | Type | Description |
---|---|---|
viewController | ViewController | The associated view controller. |
- Source
A quantification object.
- Type:
- object