| Constructor and Description |
|---|
AbstractPoint() |
| Modifier and Type | Method and Description |
|---|---|
Point |
add(float x,
float y)
Translates this point by the specified offset.
|
Point |
add(float x,
float y,
Point result)
Translates this point by the specified offset and stores the result in the object provided.
|
Point |
add(XY other,
Point result)
Translates this point by the specified offset and stores the result in the object provided.
|
Point |
clone()
Returns a mutable copy of this point.
|
float |
direction(XY other)
Returns the angle (in radians) of the vector starting at this point and ending at the
supplied other point.
|
float |
distance(float px,
float py)
Returns the Euclidian distance between this point and the specified point.
|
float |
distance(XY p)
Returns the Euclidian distance between this point and the supplied point.
|
float |
distanceSq(float px,
float py)
Returns the squared Euclidian distance between this point and the specified point.
|
float |
distanceSq(XY p)
Returns the squared Euclidian distance between this point and the supplied point.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Point |
mult(float s)
Multiplies this point by a scale factor.
|
Point |
mult(float s,
Point result)
Multiplies this point by a scale factor and places the result in the supplied object.
|
Point |
rotate(float angle)
Rotates this point around the origin by the specified angle.
|
Point |
rotate(float angle,
Point result)
Rotates this point around the origin by the specified angle, storing the result in the
point provided.
|
Point |
subtract(float x,
float y)
Subtracts the supplied point from
this. |
Point |
subtract(float x,
float y,
Point result)
Subtracts the supplied point from
this and stores the result in result. |
Point |
subtract(XY other,
Point result)
Subtracts the supplied point from
this and stores the result in result. |
String |
toString() |
public float distanceSq(float px,
float py)
IPointdistanceSq in interface IPointpublic float distanceSq(XY p)
IPointdistanceSq in interface IPointpublic float distance(float px,
float py)
IPointpublic float distance(XY p)
IPointpublic float direction(XY other)
IPointpublic Point mult(float s)
IPointpublic Point mult(float s, Point result)
IPointpublic Point add(float x, float y)
IPointpublic Point add(float x, float y, Point result)
IPointpublic Point add(XY other, Point result)
IPointpublic Point subtract(float x, float y)
IPointthis.public Point subtract(float x, float y, Point result)
IPointthis and stores the result in result.public Point subtract(XY other, Point result)
IPointthis and stores the result in result.public Point rotate(float angle)
IPointpublic Point rotate(float angle, Point result)
IPointpublic Point clone()
IPointCopyright © 2017. All rights reserved.