public class VectorFloat extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<VectorFloat>
Modifier and Type | Field and Description |
---|---|
float |
r
Radius, in pixels.
|
float |
theta
Angle anticlockwise from 0x, in radians.
|
Constructor and Description |
---|
VectorFloat(float aRadiusPixels,
float anAngleRadians)
Construct from polar coordinates.
|
VectorFloat(PointFloat pt1,
PointFloat pt2)
Construct from two points (each in Cartesian coordinates).
|
Modifier and Type | Method and Description |
---|---|
VectorFloat |
clone()
Returns a new VectorFloat object with the same data.
|
int |
compareTo(VectorFloat other)
For sorting only on angle, theta.
|
boolean |
equals(java.lang.Object other)
Test for equality within the radius and angle tolerances.
|
static float |
getAngleTolerance()
Angle tolerance for comparisons, in radians.
|
float |
getDx()
Get the x component of this vector (convert from polar to Cartesian
coordinates).
|
float |
getDy()
Get the y component of this vector (convert from polar to Cartesian
coordinates).
|
static float |
getRadiusTolerance()
Radius tolerance for comparisons, in pixels.
|
int |
hashCode() |
static void |
resetDefaultTolerances() |
static void |
setAngleTolerance(float value) |
static void |
setRadiusTolerance(float value) |
java.lang.String |
toString()
Get a String representation of the VectorFloat
|
public float r
public float theta
public VectorFloat(float aRadiusPixels, float anAngleRadians)
public VectorFloat(PointFloat pt1, PointFloat pt2)
public float getDx()
public float getDy()
public static float getRadiusTolerance()
public static void setRadiusTolerance(float value)
public static float getAngleTolerance()
public static void setAngleTolerance(float value)
public static void resetDefaultTolerances()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(VectorFloat other)
compareTo
in interface java.lang.Comparable<VectorFloat>
public java.lang.String toString()
toString
in class java.lang.Object
public VectorFloat clone()
clone
in class java.lang.Object