Constructor and Description |
---|
AbstractPoint() |
Modifier and Type | Method and Description |
---|---|
Point |
add(int x,
int y)
Translates this point by the specified offset.
|
Point |
add(int x,
int y,
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.
|
int |
distance(int px,
int py)
Returns the Euclidian distance between this point and the specified point.
|
int |
distance(IPoint p)
Returns the Euclidian distance between this point and the supplied point.
|
int |
distanceSq(int px,
int py)
Returns the squared Euclidian distance between this point and the specified point.
|
int |
distanceSq(IPoint p)
Returns the squared Euclidian distance between this point and the supplied point.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Point |
subtract(int x,
int y)
Subtracts the supplied point from
this . |
Point |
subtract(int x,
int y,
Point result)
Subtracts the supplied point from
this and stores the result in result . |
Point |
subtract(IPoint other,
Point result)
Subtracts the supplied point from
this and stores the result in result . |
String |
toString() |
public int distanceSq(int px, int py)
IPoint
distanceSq
in interface IPoint
public int distanceSq(IPoint p)
IPoint
distanceSq
in interface IPoint
public int distance(int px, int py)
IPoint
public int distance(IPoint p)
IPoint
public Point add(int x, int y)
IPoint
public Point add(int x, int y, Point result)
IPoint
public Point subtract(int x, int y)
IPoint
this
.public Point subtract(int x, int y, Point result)
IPoint
this
and stores the result in result
.public Point subtract(IPoint other, Point result)
IPoint
this
and stores the result in result
.public Point clone()
IPoint
Copyright © 2017. All rights reserved.