|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object appletbots.geometry.Point
public class Point
This class represents a point in two-dimensional space
Field Summary | |
---|---|
double |
x
The x-coordinate |
double |
y
The y-coordinate |
Constructor Summary | |
---|---|
Point(double x,
double y)
Creates a new point with the given coordinates |
Method Summary | |
---|---|
Point |
add(Vector vector)
Returns the result of adding a vector to this point |
java.lang.Object |
clone()
Returns a copy of this point |
double |
distance(Point point)
Returns the distance between this point and another point |
boolean |
equals(java.lang.Object obj)
Returns whether or not this point equals another point |
java.lang.String |
toString()
Returns a string representation of this point |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double x
public double y
Constructor Detail |
---|
public Point(double x, double y)
x
- The x-coordinatey
- The y-coordinateMethod Detail |
---|
public double distance(Point point)
point
- Another point
public Point add(Vector vector)
vector
- The vector to add
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Another point
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |