public class VisionCoordinate
extends java.lang.Object
Constructor and Description |
---|
VisionCoordinate(double x,
double y) |
VisionCoordinate(double x,
double y,
double theta) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
double |
getAngleTo(VisionCoordinate other)
Returns the angle from this coordinate to other in degrees.
|
double |
getDistanceTo(VisionCoordinate other)
Returns the 2d euclidean distances to the other coordinate, assuming they
are based on the same coordinate system
|
java.util.Optional<java.lang.Double> |
getTheta() |
double |
getThetaOrZero() |
java.lang.String |
toString() |
public VisionCoordinate(double x, double y)
public VisionCoordinate(double x, double y, double theta)
x
- X portion of the coordinate with respect to the coordinate system originy
- Y portion of the coordinate with respect to the coordinate system origintheta
- an angle in radians as defined abovepublic double getAngleTo(VisionCoordinate other)
other
- The target coordinatepublic double getDistanceTo(VisionCoordinate other)
other
- The target coordinatepublic java.util.Optional<java.lang.Double> getTheta()
public double getThetaOrZero()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object