Length of a segment
length of a segment
Shape name
name of the shape
Slope of the line - angle to axe x in radians from 0 to 2PI
slope in radians from 0 to 2PI
Check if segment contains point
Query point
true if segment contains point
Check if segment is equal to other segment
query segment
true if equals to query segment, false otherwise
Rotate shape by given angle around given center point. If center point is omitted, rotates around zero point (0,0). Positive value of angle defines rotation in counterclockwise direction, negative angle defines rotation in clockwise direction
angle in radians
center of rotation
new rotated shape
When point belongs to segment, return array of two segments split by given point, if point is inside segment. Returns clone of this segment if query point is incident to start or end point of the segment. Returns empty array if point does not belong to segment
Query point
Class representing a segment