Companion

object Companion

Functions

Link copied to clipboard
fun linesIntersect(x1: double, y1: double, x2: double, y2: double, x3: double, y3: double, x4: double, y4: double): Boolean
Link copied to clipboard
fun ptLineDist(x1: double, y1: double, x2: double, y2: double, px: double, py: double): double

Returns the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.

Link copied to clipboard
fun ptLineDistSq(x1: double, y1: double, x2: double, y2: double, px: double, py: double): double

Returns the square of the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.

Link copied to clipboard
fun relativeCCW(x1: double, y1: double, x2: double, y2: double, px: double, py: double): int

Returns an indicator of where the specified point {@code (px,py)} lies with respect to the line segment from {@code (x1,y1)} to {@code (x2,y2)}. The return value can be either 1, -1, or 0 and indicates in which direction the specified line must pivot around its first end point, {@code (x1,y1)}, in order to point at the specified point {@code (px,py)} .