public final class LineHelper
extends java.lang.Object
Line objects.Line| Modifier and Type | Method and Description |
|---|---|
static <D extends TwoMin> |
areLinesParallel(Line<D> l1,
Line<D> l2)
Checks if two lines are parallel.
|
static <D extends TwoMin & ThreeMax> |
calculateIntersectionPoint(Line<D> l1,
Line<D> l2)
Calculates the intersection point of two lines.
|
static <D extends TwoMin> |
isPointOnLine(Line<D> l,
Vec<D> p)
Checks if a point lies on a line.
|
public static <D extends TwoMin> boolean isPointOnLine(Line<D> l, Vec<D> p)
l - the linep - the pointjava.lang.NullPointerException - if l or p is nullpublic static <D extends TwoMin> boolean areLinesParallel(Line<D> l1, Line<D> l2)
l1 - the first linel2 - the second linejava.lang.NullPointerException - if l1 or l2 is nullpublic static <D extends TwoMin & ThreeMax> java.util.Optional<Vec<D>> calculateIntersectionPoint(Line<D> l1, Line<D> l2)
l1 - the first linel2 - the second lineOptional will be returned.java.lang.NullPointerException - if l1 or l2 is null