public class Geometry extends Object
| Constructor and Description |
|---|
Geometry() |
| Modifier and Type | Method and Description |
|---|---|
static Point |
center(BoundingBox bbox)
Calculates the center of the given bounding box and returns a point representing that center.
|
static double |
dotProduct(Point a,
Point b)
Computes the dot product of the given two points
|
static double |
euclideanDistance(Point a,
Point b)
Calculates the Eucledian distance between two points a and b.
|
static GeneralPath |
normalize(GeneralPath path) |
static GeneralPath |
toGeneralPath(Curve curve) |
static Point |
weightedSum(double weightA,
Point a,
double weightB,
Point b)
Adds the given points a and b, weighted by the respective weight, i.e.:
weightA * a + weightB * b Attention! z may be NaN -- in this case, the weighted sum for z will be NaN too. |
public static GeneralPath toGeneralPath(Curve curve)
curve - public static GeneralPath normalize(GeneralPath path)
path - public static Point center(BoundingBox bbox)
bbox - public static double euclideanDistance(Point a, Point b)
a - b - public static Point weightedSum(double weightA, Point a, double weightB, Point b)
weightA - scalar weight of vector aa - weightB - scalar weight of vector bb - Copyright © 2009–2020. All rights reserved.