public class Point extends Object
| Constructor and Description |
|---|
Point(double x,
double y)
Constructor.
|
Point(Point c)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
clone(Point c)
Will clone the point.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Point |
minus(Point c)
Will subtract a point
|
Point |
plus(Point c)
Will add a point.
|
Point |
setPosition(double x,
double y)
Will change the postion o this point.
|
String |
toString() |
double |
xPos()
Will return the x position.
|
double |
yPos()
Will return the y position.
|
public Point(Point c)
c - other pointpublic Point(double x,
double y)
x - x posy - y pospublic Point setPosition(double x, double y)
x - the new x posy - the new y pospublic double xPos()
public double yPos()
public Point minus(Point c)
c - another pointpublic Point plus(Point c)
c - the new pointpublic Point clone(Point c)
c - the point to cloneCopyright © 2011–2015 SWM. All rights reserved.