D - the dimension of the line segmentpublic final class LineSeg<D extends TwoMin> extends GeometrixObject
LineSegHelper| Modifier and Type | Method and Description |
|---|---|
static <D extends TwoMin> |
create(Vec<D> p1,
Vec<D> p2)
Creates a new line segment out of two points.
|
boolean |
equals(java.lang.Object o) |
D |
getDimension() |
Vec<D> |
getP1() |
Vec<D> |
getP2() |
int |
hashCode() |
boolean |
resembles(java.lang.Object o) |
java.lang.String |
toString() |
public static <D extends TwoMin> LineSeg<D> create(Vec<D> p1, Vec<D> p2)
p1 - the first point, must be unequal to p2p2 - the second point, must be unequal to p1java.lang.NullPointerException - if p1 or p2 is nulljava.lang.IllegalArgumentException - if p1 is equal to p2java.lang.IllegalArgumentException - if p1 or p2 lies outside the object spacepublic boolean resembles(java.lang.Object o)
resembles in class GeometrixObjectpublic boolean equals(java.lang.Object o)
equals in class GeometrixObjectpublic int hashCode()
hashCode in class GeometrixObjectpublic java.lang.String toString()
toString in class GeometrixObjectpublic D getDimension()