public class Translation
extends java.lang.Object
Constructor and Description |
---|
Translation()
Default constructor: Zero vector
|
Translation(double x,
double y)
Create a translation vector from an x and y value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Translation t) |
double |
getX() |
double |
getY() |
Translation |
rotate(Rotation rotation)
Rotate a translation vector.
|
java.lang.String |
toString() |
Translation |
translate(Translation other)
Translate a translation vector.
|
public Translation(double x, double y)
x
- x valuey
- y valuepublic Translation()
public double getX()
public double getY()
public Translation translate(Translation other)
other
- vector to translate bypublic Translation rotate(Rotation rotation)
rotation
- rotation matrix to multiply the translation vector bypublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(Translation t)