Constructor and Description |
---|
Translation()
Creates a zeroed out translation.
|
Translation(double x,
double y)
Creates a translation using the given x and y values.
|
Translation(Translation translation)
Creates a copy of the given translation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
getX()
Returns the translation on the x axis.
|
double |
getY()
Returns the translation on the y axis.
|
void |
setX(double x)
Sets the translation on the x axis.
|
void |
setY(double y)
Sets the translation on the y axis.
|
String |
toString() |
public Translation()
public Translation(double x, double y)
x
- translation on the x axisy
- translation on the y axispublic Translation(Translation translation)
translation
- the translation to be copiedpublic double getX()
public double getY()
public void setX(double x)
x
- the translation on the x axispublic void setY(double y)
y
- the translation on the y axisCopyright © 2018. All rights reserved.