public class Point extends Object
Modifier and Type | Method and Description |
---|---|
float |
distanceTo(Point p) |
boolean |
IsInUnitRange() |
float |
length() |
Point |
minus(float x,
float y) |
Point |
minus(Point point) |
Point |
mult(float x,
float y) |
Point |
normalize() |
Point |
plus(float x,
float y) |
Point |
plus(Point point) |
Point |
rotated(float radians) |
Point |
rotated90(int count) |
Point |
rotatedAround(Point center,
float radians) |
Point |
scaledTo(float length) |
void |
set(float x,
float y) |
Point |
times(float s) |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
public void set(float x, float y)
public boolean IsInUnitRange()
public Point plus(float x, float y)
public Point minus(float x, float y)
public Point times(float s)
public Point mult(float x, float y)
public float length()
public float distanceTo(Point p)
public Point scaledTo(float length)
public Point normalize()
public Point rotated90(int count)
public Point rotated(float radians)
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.