public class Direction
extends java.lang.Object
Constructor and Description |
---|
Direction(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
Direction |
copy() |
boolean |
equals(java.lang.Object d)
Checks if a direction and this are the same.
|
Vector2d |
getVector() |
static boolean |
orthogonal(Direction a,
Direction b)
Returns true if both directions are orthogonal
|
java.lang.String |
toString()
Returns a representative String of this vector.
|
double |
x() |
double |
y() |
public double x()
public double y()
public Direction copy()
public Vector2d getVector()
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean orthogonal(Direction a, Direction b)
a
- one directionb
- another directionpublic boolean equals(java.lang.Object d)
equals
in class java.lang.Object
d
- the other direction to check