If this segment is parallel to Line L, then return null.
Returns a vertical cross point with P. 求点P到直线的垂直交点。
Returns a cross point of this segment and Ray(p, rad). 求与射线的交点。
If the cross point is not exist, then return null.
Returns a cross point with a segment. 求与线段的交点。
Returns the middle point of Segment P1P2. 返回线段的中点
Returns the ratio point of this segment. 定比分点公式
Must not equals -1.
斜率
Returns the square of the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.
a value that is the square of the distance from the specified point to the specified line segment.
Returns the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.
a value that is the distance from the specified point to the specified line segment.
Tests if the line segment from p1 to p2 intersects the line segment from p3 to p4.
true
if the first specified line segment
and the second specified line segment intersect
each other; false
otherwise.
P1,P2,P3 is collinear. 三点是否共线
Returns the relation position of Line1(p1,p2) and Line2(p3,p4). 直线1与直线2的位置关系。
-1 is Parallel and Non-Collinear; 0 is Collinear; 1 is Cross and Non-Vertical; 2 is Cross and Vertical.
Caculate the slope of Segment P1P2. 计算线段(p1,p2)的斜率。当线段与X轴垂直时,斜率不存在
when P1P2 is vertical to the X, then return null.
Returns a cross point of Line L. 求与直线的交点。