public interface IPoint extends Cloneable
Point
.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.
|
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 . |
int |
x()
Returns this point's x-coordinate.
|
int |
y()
Returns this point's y-coordinate.
|
int x()
int y()
int distanceSq(int px, int py)
int distanceSq(IPoint p)
int distance(int px, int py)
int distance(IPoint p)
Point add(int x, int y)
Point add(int x, int y, Point result)
Point subtract(int x, int y)
this
.Point subtract(int x, int y, Point result)
this
and stores the result in result
.Point subtract(IPoint other, Point result)
this
and stores the result in result
.Point clone()
Copyright © 2017. All rights reserved.