java.lang.Object
org.jhotdraw8.geom.biarc.Line
Defines a line in point-slope form: y - y1 = m * (x - x1).
Vertical line: m = NaN
Horizontal line: m = 0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLine(Point2D.Double p, double m) Define a line by a point and slope.Line(Point2D.Double p1, Point2D.Double p2) Define a line by two points. -
Method Summary
Modifier and TypeMethodDescriptionstatic LineCreates a a line which is perpendicular to the line defined by P and P1 and goes through PIntersection(Line l) Calculate the intersection point of this line and another one.
-
Field Details
-
m
public final double mSlope. -
p
Point.
-
-
Constructor Details
-
Line
Define a line by two points.- Parameters:
p1- first pointp2- second point
-
Line
Define a line by a point and slope.- Parameters:
p- pointm- slope
-
-
Method Details
-
Intersection
Calculate the intersection point of this line and another one.- Parameters:
l- another line- Returns:
- the intersection point
-
createPerpendicularAt
Creates a a line which is perpendicular to the line defined by P and P1 and goes through P- Parameters:
P-P1-- Returns:
-