Namespace: CartesianGeometryMath

svgext.CartesianGeometryMath

Static class provides methods to work with lines in a cartesian coordinates
Source:

Methods

(static) checkLinesIntersection(lS1, lS2) → {Boolean}

Checks if two lines segments are intersected
Parameters:
Name Type Description
lS1 LineSegment
lS2 LineSegment
Source:
Returns:
Type
Boolean

(static) distanceBtwTwoPoints(point1, point2) → {Number}

Counts distance between two points
Parameters:
Name Type Description
point1 Point First point
point2 Point First point
Source:
Returns:
Type
Number

(static) findPolygonInsertIndex(polygonPoints, point) → {Number}

Finds an index in the polygon points array between 2 nearest points to the passed coordinates
Parameters:
Name Type Description
polygonPoints Array
point Point New vertex coordinates
Source:
Returns:
Type
Number

(static) generateLineSegments(points) → {Array.<LineSegment>}

Generates line segments array based on passed coordinates
Parameters:
Name Type Description
points Array.<Number> polygon vertexes coordinates
Source:
Returns:
Type
Array.<LineSegment>

(static) lineSegmentMidPoint(lineSegment) → {Array}

Finds line segment middle point
Parameters:
Name Type Description
lineSegment LineSegment
Source:
Returns:
Point
Type
Array