public class Points extends Object
Modifier and Type | Field and Description |
---|---|
static IPoint |
ZERO
The point at the origin.
|
Constructor and Description |
---|
Points() |
Modifier and Type | Method and Description |
---|---|
static double |
distance(double x1,
double y1,
double x2,
double y2)
Returns the Euclidean distance between the specified two points.
|
static double |
distanceSq(double x1,
double y1,
double x2,
double y2)
Returns the squared Euclidean distance between the specified two points.
|
static boolean |
epsilonEquals(IPoint p1,
IPoint p2)
Returns true if the supplied points' x and y components are equal to one another within
MathUtil.EPSILON . |
static boolean |
epsilonEquals(IPoint p1,
IPoint p2,
double epsilon)
Returns true if the supplied points' x and y components are equal to one another within
epsilon . |
static Point |
inverseTransform(double x,
double y,
double sx,
double sy,
double rotation,
double tx,
double ty,
Point result)
Inverse transforms a point as specified, storing the result in the point provided.
|
static String |
pointToString(double x,
double y)
Returns a string describing the supplied point, of the form
+x+y ,
+x-y , -x-y , etc. |
static Point |
transform(double x,
double y,
double sx,
double sy,
double sina,
double cosa,
double tx,
double ty,
Point result)
Transforms a point as specified, storing the result in the point provided.
|
static Point |
transform(double x,
double y,
double sx,
double sy,
double rotation,
double tx,
double ty,
Point result)
Transforms a point as specified, storing the result in the point provided.
|
public static final IPoint ZERO
public static double distanceSq(double x1, double y1, double x2, double y2)
public static double distance(double x1, double y1, double x2, double y2)
public static boolean epsilonEquals(IPoint p1, IPoint p2)
MathUtil.EPSILON
.public static boolean epsilonEquals(IPoint p1, IPoint p2, double epsilon)
epsilon
.public static Point transform(double x, double y, double sx, double sy, double rotation, double tx, double ty, Point result)
public static Point transform(double x, double y, double sx, double sy, double sina, double cosa, double tx, double ty, Point result)
public static Point inverseTransform(double x, double y, double sx, double sy, double rotation, double tx, double ty, Point result)
public static String pointToString(double x, double y)
+x+y
,
+x-y
, -x-y
, etc.Copyright © 2017. All rights reserved.