public final class GeometryUtils extends Object
Modifier and Type | Field and Description |
---|---|
static double |
EPSILON
Small double for "equality" checks.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(double a,
double b)
Check if 2 double values are equal (withing
EPSILON of each other). |
static boolean |
equals(double x1,
double y1,
double x2,
double y2)
Check if 2 points equal.
|
static double |
getAngle(double x0,
double y0,
double x1,
double y1)
Calculate the angle between a line defined by 2 points.
|
static boolean |
isNonZero(double value)
Checks if
value is not within EPSILON of 0.0. |
static boolean |
isZero(double value)
Checks if
value is within EPSILON of 0.0. |
static boolean |
lineContains(double x0,
double y0,
double x1,
double y1,
double x2,
double y2)
Checks if point (x0, y0) is in line (x1, y1), (x2, y2).
|
static boolean |
linesIntersect(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4)
Checks if line (x1, y1), (x2, y2) intersects the line (x3, y3), (x4, y4).
|
static Shape |
toShape(Object value)
Get a shape for
value (if possible). |
public static final double EPSILON
public static boolean isZero(double value)
value
is within EPSILON
of 0.0.public static boolean isNonZero(double value)
value
is not within EPSILON
of 0.0.public static boolean equals(double a, double b)
EPSILON
of each other).public static boolean equals(double x1, double y1, double x2, double y2)
public static boolean lineContains(double x0, double y0, double x1, double y1, double x2, double y2)
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
public static double getAngle(double x0, double y0, double x1, double y1)
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.