|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPinBallDomain.Point
public class Point
A 2D point
Constructor Summary | |
---|---|
Point(double xx,
double yy)
Construct a point. |
Method Summary | |
---|---|
Point |
add(Point b)
Compute a new point that is this point plus another. |
Point |
addTo(Point b)
Add another point to this one. |
double |
angleBetween(Point p)
Compute the angle between this point and another. |
double |
distanceTo(Point t)
Get the distance from this point to another. |
double |
dot(Point b)
Compute the dot product of this and a given point. |
double |
getX()
Get the point's X coordinate. |
double |
getY()
Get the point's Y coordinate. |
Point |
minus(Point b)
Compute a new point that is the difference between this point and another. |
Point |
normalize()
Compute a normalized version of this point. |
double |
size()
Return the length of the vector corresponding to this point. |
Point |
times(double d)
Compute a new point that is a constant multiple of this point. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Point(double xx, double yy)
xx
- X coordinateyy
- Y coordinateMethod Detail |
---|
public double getX()
public double getY()
public double distanceTo(Point t)
t
- other point
t
public Point minus(Point b)
b
- the point to subtract
public double dot(Point b)
b
- the other point
b
public Point times(double d)
d
- multiple
public Point add(Point b)
b
- the other point
public Point addTo(Point b)
b
- the other point
public double size()
public Point normalize()
public double angleBetween(Point p)
p
- the other point
p
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |