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 float |
distance(float x1,
float y1,
float x2,
float y2)
Returns the Euclidean distance between the specified two points.
|
static float |
distanceSq(float x1,
float y1,
float x2,
float 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,
float epsilon)
Returns true if the supplied points' x and y components are equal to one another within
epsilon . |
static Point |
inverseTransform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Point result)
Inverse transforms a point as specified, storing the result in the point provided.
|
static String |
pointToString(float x,
float y)
Returns a string describing the supplied point, of the form
+x+y ,
+x-y , -x-y , etc. |
static Point |
transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
float tx,
float ty,
Point result)
Transforms a point as specified, storing the result in the point provided.
|
static Point |
transform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Point result)
Transforms a point as specified, storing the result in the point provided.
|
public static final IPoint ZERO
public static float distanceSq(float x1, float y1, float x2, float y2)
public static float distance(float x1, float y1, float x2, float y2)
public static boolean epsilonEquals(IPoint p1, IPoint p2)
MathUtil.EPSILON
.public static boolean epsilonEquals(IPoint p1, IPoint p2, float epsilon)
epsilon
.public static Point transform(float x, float y, float sx, float sy, float rotation, float tx, float ty, Point result)
public static Point transform(float x, float y, float sx, float sy, float sina, float cosa, float tx, float ty, Point result)
public static Point inverseTransform(float x, float y, float sx, float sy, float rotation, float tx, float ty, Point result)
public static String pointToString(float x, float y)
+x+y
,
+x-y
, -x-y
, etc.Copyright © 2017. All rights reserved.