Package georegression.geometry
Class UtilVector2D_F32
java.lang.Object
georegression.geometry.UtilVector2D_F32
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
acute
(float ax, float ay, float bx, float by) static float
acute
(Vector2D_F32 a, Vector2D_F32 b) Returns the acute angle between the two vectors.static boolean
identicalSign
(float xa, float ya, float xb, float yb, float tol) Tests to see if the two vectors are identical up to a sign differencestatic Vector2D_F32
minus
(Point2D_F32 a, Point2D_F32 b, @Nullable Vector2D_F32 output) Sets the vector equal to 'a' - 'b'.
-
Constructor Details
-
UtilVector2D_F32
public UtilVector2D_F32()
-
-
Method Details
-
acute
Returns the acute angle between the two vectors. Computed using the dot product.- Parameters:
a
- vectorb
- vector- Returns:
- acute angle
-
acute
public static float acute(float ax, float ay, float bx, float by) -
minus
public static Vector2D_F32 minus(Point2D_F32 a, Point2D_F32 b, @Nullable @Nullable Vector2D_F32 output) Sets the vector equal to 'a' - 'b'.- Parameters:
a
- pointb
- pointoutput
- (output) optional storage for vector.- Returns:
- Solution
-
identicalSign
public static boolean identicalSign(float xa, float ya, float xb, float yb, float tol) Tests to see if the two vectors are identical up to a sign difference- Parameters:
xa
- x-component of vector 'a'ya
- y-component of vector 'a'xb
- x-component of vector 'b'yb
- y-component of vector 'b'tol
- Tolerance in Euclidan distance- Returns:
- true if identical to within tolerance and a sign ambiguity
-