georegression.struct.point
Class Vector2D_F64
- java.lang.Object
-
- georegression.struct.GeoTuple<T>
-
- georegression.struct.GeoTuple_F64<T>
-
- georegression.struct.GeoTuple2D_F64<Vector2D_F64>
-
- georegression.struct.point.Vector2D_F64
-
- All Implemented Interfaces:
- java.io.Serializable
public class Vector2D_F64 extends GeoTuple2D_F64<Vector2D_F64>
Spacial vector in 2D- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class georegression.struct.GeoTuple2D_F64
x, y
-
-
Constructor Summary
Constructors Constructor and Description Vector2D_F64()Vector2D_F64(double x, double y)Vector2D_F64(GeoTuple2D_F64 orig)Vector2D_F64(Vector2D_F64 pt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleacute(Vector2D_F64 a)Returns the acute angle between the two vectors.Vector2D_F64copy()Generic copy routine.Vector2D_F64createNewInstance()Creates a new tuple instance of the same type.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()voidset(Vector2D_F64 orig)java.lang.StringtoString()-
Methods inherited from class georegression.struct.GeoTuple2D_F64
distance, distance, distance2, distance2, getDimension, getIndex, getX, getY, isIdentical, isIdentical, isIdentical, norm, normSq, plus, plusIP, print, scale, set, setIndex, setX, setY, times, timesIP
-
-
-
-
Constructor Detail
-
Vector2D_F64
public Vector2D_F64(GeoTuple2D_F64 orig)
-
Vector2D_F64
public Vector2D_F64(double x, double y)
-
Vector2D_F64
public Vector2D_F64()
-
Vector2D_F64
public Vector2D_F64(Vector2D_F64 pt)
-
-
Method Detail
-
createNewInstance
public Vector2D_F64 createNewInstance()
Description copied from class:GeoTupleCreates a new tuple instance of the same type.
- Specified by:
createNewInstancein classGeoTuple<Vector2D_F64>- Returns:
- new tuple instance.
-
set
public void set(Vector2D_F64 orig)
-
copy
public Vector2D_F64 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.
-
normalize
public void normalize()
-
minus
public void minus(Point2D_F64 a, Point2D_F64 b)
In-place minus operation. this = a - b.- Parameters:
a- Pointb- Point
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
dot
public double dot(Vector2D_F64 a)
Dot product between this and 'a' = this.x * a.x + this.y * a.y- Parameters:
a- A vector- Returns:
- dot product.
-
acute
public double acute(Vector2D_F64 a)
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'.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG