public class Vector extends Object
| Constructor and Description |
|---|
Vector() |
| Modifier and Type | Method and Description |
|---|---|
static <P extends C2D> |
add(P p0,
P p1)
Adds two
Positions. |
static <P extends C2D> |
dot(P p0,
P p1)
Returns the dot-product of the specified
Positions |
static <P extends C2D> |
perp(P p)
Hill's "perp" operator.
|
static <P extends C2D> |
perpDot(P p0,
P p1)
Applies the perp dot-operation on the specified
Positions |
static <P extends C2D> |
positionToSegment2D(P p0,
P p1,
P y)
Returns the squared distance and projectionfactor of the position y
on the linesegment defined by positions p0 and p1
|
static <P extends C2D> |
substract(P p0,
P p1)
Subtracts two
Positions. |
public static <P extends C2D> double[] positionToSegment2D(P p0, P p1, P y)
The projection factor is the value for t that determines the projection of y on the line p0 + t*(p1-p0).
p0 - the start position of the line segmentp1 - the end position of the line segmenty - the position to project onto the linesegmentpublic static <P extends C2D> double dot(P p0, P p1)
Positionsp0 - first operandp1 - second operandpublic static <P extends C2D> P add(P p0, P p1)
Positions.
If any of the parameters are 2D, the operation is performed in 2D.
p0 - first operandp1 - second operandpublic static <P extends C2D> P substract(P p0, P p1)
Positions.
If any of the parameters are 2D, the operation is performed in 2D.
p0 - first operandp1 - second operandpublic static <P extends C2D> P perp(P p)
The application of this operator on a vector P returns the vector perpendicular at 90 deg.
counterclockwise
from P in the 2D (X/Y) plane.
p - a vector represented by a Position.public static <P extends C2D> double perpDot(P p0, P p1)
Positions
The perp dot operation on vectors P, Q is defined as
dot(perp(P),Q).
This operation will be performed in 2D only.
p0 - first operandp1 - second operandCopyright © 2023 geolatte.org. All rights reserved.