public class Point2D
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
x
x value
|
private double |
y
y value
|
Constructor and Description |
---|
Point2D(double x,
double y)
double constructor
|
Point2D(float x,
float y)
float constructor
|
Point2D(int x,
int y)
int constructor
|
Modifier and Type | Method and Description |
---|---|
void |
decrementX(double dec)
decrement the x value as a double
|
void |
decrementX(float dec)
decrement the x value as a float
|
void |
decrementX(int dec)
decrement the x value as an integer
|
void |
decrementY(double dec)
decrement the y value as a double
|
void |
decrementY(float dec)
decrement the y value as a float
|
void |
decrementY(int dec)
decrement the y value as an integer
|
void |
incrementX(double inc)
increment the x value as a double
|
void |
incrementX(float inc)
increment the x value as a float
|
void |
incrementX(int inc)
increment the x value as an integer
|
void |
incrementY(double inc)
increment the y value as a double
|
void |
incrementY(float inc)
increment the y value as a float
|
void |
incrementY(int inc)
increment the y value as an integer
|
void |
setX(double x)
Sets the x value as a double
|
void |
setX(float x)
Sets the x value as a float
|
void |
setX(int x)
Sets the x value as an integer
|
void |
setY(double y)
Sets the y value as a double
|
void |
setY(float y)
Sets the y value as a float
|
void |
setY(int y)
Sets the y value as an integer
|
double |
X()
Returns the x value
|
double |
Y()
Returns the y value
|
public Point2D(double x, double y)
x
- x value as a doubley
- y value as a doublepublic Point2D(float x, float y)
x
- x value as a floaty
- y value as a floatpublic Point2D(int x, int y)
x
- x value as integery
- y value as integerpublic final double X()
public final void setX(double x)
x
- new x value as a doublepublic final void setX(float x)
x
- new x value as a floatpublic final void setX(int x)
x
- new x value as an integerpublic final void incrementX(double inc)
inc
- increment to x as a doublepublic final void incrementX(float inc)
inc
- increment to x as a floatpublic final void incrementX(int inc)
inc
- increment to x as a integerpublic final void decrementX(double dec)
dec
- increment to x as a doublepublic final void decrementX(float dec)
dec
- increment to x as a floatpublic final void decrementX(int dec)
dec
- increment to x as a integerpublic final double Y()
public final void setY(double y)
y
- new y value as a doublepublic final void setY(float y)
y
- new y value as a floatpublic final void setY(int y)
y
- new y value as an integerpublic final void incrementY(double inc)
inc
- increment to y as a doublepublic final void incrementY(float inc)
inc
- increment to y as a floatpublic final void incrementY(int inc)
inc
- increment to y as a integerpublic final void decrementY(double dec)
dec
- increment to y as a doublepublic final void decrementY(float dec)
dec
- increment to y as a floatpublic final void decrementY(int dec)
dec
- increment to y as a integer