Modifier and Type | Method and Description |
---|---|
static Coordinate |
intersection(Coordinate p1,
Coordinate p2,
Coordinate q1,
Coordinate q2)
Computes an intersection point between two lines
using DD arithmetic.
|
static int |
orientationIndex(Coordinate p1,
Coordinate p2,
Coordinate q)
Returns the index of the direction of the point
q relative to
a vector specified by p1-p2 . |
static int |
orientationIndex(double p1x,
double p1y,
double p2x,
double p2y,
double qx,
double qy)
Returns the index of the direction of the point
q relative to
a vector specified by p1-p2 . |
static int |
signOfDet2x2(DD x1,
DD y1,
DD x2,
DD y2)
Computes the sign of the determinant of the 2x2 matrix
with the given entries.
|
static int |
signOfDet2x2(double dx1,
double dy1,
double dx2,
double dy2)
Computes the sign of the determinant of the 2x2 matrix
with the given entries.
|
public static int orientationIndex(Coordinate p1, Coordinate p2, Coordinate q)
q
relative to
a vector specified by p1-p2
.p1
- the origin point of the vectorp2
- the final point of the vectorq
- the point to compute the direction to1
if q is counter-clockwise (left) from p1-p2
-1
if q is clockwise (right) from p1-p2
0
if q is collinear with p1-p2public static int orientationIndex(double p1x, double p1y, double p2x, double p2y, double qx, double qy)
q
relative to
a vector specified by p1-p2
.p1x
- the x ordinate of the vector origin pointp1y
- the y ordinate of the vector origin pointp2x
- the x ordinate of the vector final pointp2y
- the y ordinate of the vector final pointqx
- the x ordinate of the query pointqy
- the y ordinate of the query pointpublic static int signOfDet2x2(DD x1, DD y1, DD x2, DD y2)
public static int signOfDet2x2(double dx1, double dy1, double dx2, double dy2)
public static Coordinate intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
p1
- an endpoint of line segment 1p2
- an endpoint of line segment 1q1
- an endpoint of line segment 2q2
- an endpoint of line segment 2Copyright © 2024. All rights reserved.