Package georegression.geometry
Class UtilVector2D_F64
java.lang.Object
georegression.geometry.UtilVector2D_F64
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
acute
(double ax, double ay, double bx, double by) static double
acute
(Vector2D_F64 a, Vector2D_F64 b) Returns the acute angle between the two vectors.static boolean
identicalSign
(double xa, double ya, double xb, double yb, double tol) Tests to see if the two vectors are identical up to a sign differencestatic Vector2D_F64
minus
(Point2D_F64 a, Point2D_F64 b, @Nullable Vector2D_F64 output) Sets the vector equal to 'a' - 'b'.
-
Constructor Details
-
UtilVector2D_F64
public UtilVector2D_F64()
-
-
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 double acute(double ax, double ay, double bx, double by) -
minus
public static Vector2D_F64 minus(Point2D_F64 a, Point2D_F64 b, @Nullable @Nullable Vector2D_F64 output) Sets the vector equal to 'a' - 'b'.- Parameters:
a
- pointb
- pointoutput
- (output) optional storage for vector.- Returns:
- Solution
-
identicalSign
public static boolean identicalSign(double xa, double ya, double xb, double yb, double 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
-