Package georegression.struct.point
Class Vector2D_F64
- All Implemented Interfaces:
Serializable,MapFormattable,MatrixFormattable
Spacial vector in 2D
- See Also:
-
Field Summary
Fields inherited from class georegression.struct.GeoTuple2D_F64
x, y -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the acute angle between the two vectors.copy()Generic copy routine.Creates a new tuple instance of the same type.doubledot(double x, double y) doubledot(Vector2D_F64 a) Dot product between this and 'a' = this.x * a.x + this.y * a.yvoidminus(Point2D_F64 a, Point2D_F64 b) In-place minus operation.voidNormalize the vector so that the f-norm is 1.setTo(Vector2D_F64 src) Sets this equal to 'src'Methods inherited from class georegression.struct.GeoTuple2D_F64
_setTo, distance, distance, distance2, distance2, equals, formatMap, getDimension, getIdx, hashCode, isIdentical, isIdentical, isIdentical, isNaN, maxAbs, norm, normSq, plus, plusIP, print, scale, setIdx, setTo, times, timesIP, zeroMethods inherited from class georegression.struct.GeoTuple_F64
format, isInfiniteMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ejml.MapFormattable
formatMapMethods inherited from interface org.ejml.MatrixFormattable
format
-
Constructor Details
-
Vector2D_F64
-
Vector2D_F64
public Vector2D_F64(double x, double y) -
Vector2D_F64
public Vector2D_F64() -
Vector2D_F64
-
-
Method Details
-
createNewInstance
Description copied from class:GeoTupleCreates a new tuple instance of the same type.
- Specified by:
createNewInstancein classGeoTuple<Vector2D_F64>- Returns:
- new tuple instance.
-
copy
Description copied from class:GeoTuple_F64Generic copy routine. It is recommended that this be overridden with a faster implementation.- Overrides:
copyin classGeoTuple_F64<Vector2D_F64>- Returns:
- An exact copy of this GeoTuple.
-
setTo
Description copied from class:GeoTupleSets this equal to 'src'- Overrides:
setToin classGeoTuple2D_F64<Vector2D_F64>- Parameters:
src- The tuple being copied- Returns:
- Reference to 'this' class instance. Used to chain operations.
-
normalize
public void normalize()Normalize the vector so that the f-norm is 1. Care is taken to avoid overflow -
normalized
-
minus
In-place minus operation. this = a - b.- Parameters:
a- Pointb- Point
-
dot
Dot product between this and 'a' = this.x * a.x + this.y * a.y- Parameters:
a- A vector- Returns:
- dot product.
-
dot
public double dot(double x, double y) -
acute
Returns the acute angle between the two vectors. Computed using the dot product.- Parameters:
a- Vector- Returns:
- Acute angle in radians between 'this' and 'a'.
-