Package georegression.struct.point
Class Vector2D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.point.Vector2D_F64") public class Vector2D_F32 extends GeoTuple2D_F32<Vector2D_F32>
Spacial vector in 2D
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class georegression.struct.GeoTuple2D_F32
x, y
-
Constructor Summary
Constructors Constructor Description Vector2D_F32()
Vector2D_F32(float x, float y)
Vector2D_F32(GeoTuple2D_F32 orig)
Vector2D_F32(Vector2D_F32 pt)
-
Method Summary
Modifier and Type Method Description float
acute(Vector2D_F32 a)
Returns the acute angle between the two vectors.Vector2D_F32
copy()
Generic copy routine.Vector2D_F32
createNewInstance()
Creates a new tuple instance of the same type.float
dot(Vector2D_F32 a)
Dot product between this and 'a' = this.x * a.x + this.y * a.yvoid
minus(Point2D_F32 a, Point2D_F32 b)
In-place minus operation.void
normalize()
void
set(Vector2D_F32 orig)
String
toString()
Methods inherited from class georegression.struct.GeoTuple2D_F32
_setTo, distance, distance, distance2, distance2, equals, getDimension, getIdx, getX, getY, hashCode, isIdentical, isIdentical, isIdentical, isNaN, norm, normSq, plus, plusIP, print, scale, setIdx, setTo, setTo, setX, setY, times, timesIP, toString
-
Constructor Details
-
Vector2D_F32
-
Vector2D_F32
public Vector2D_F32(float x, float y) -
Vector2D_F32
public Vector2D_F32() -
Vector2D_F32
-
-
Method Details
-
createNewInstance
Description copied from class:GeoTuple
Creates a new tuple instance of the same type.
- Specified by:
createNewInstance
in classGeoTuple<Vector2D_F32>
- Returns:
- new tuple instance.
-
set
-
copy
Description copied from class:GeoTuple_F32
Generic copy routine. It is recommended that this be overridden with a faster implementation.- Overrides:
copy
in classGeoTuple_F32<Vector2D_F32>
- Returns:
- An exact copy of this GeoTuple.
-
normalize
public void normalize() -
minus
In-place minus operation. this = a - b.- Parameters:
a
- Pointb
- Point
-
toString
-
dot
Dot product between this and 'a' = this.x * a.x + this.y * a.y- Parameters:
a
- A vector- Returns:
- dot product.
-
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'.
-