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:
  • Constructor Details

    • Vector2D_F32

      public Vector2D_F32(GeoTuple2D_F32 orig)
    • Vector2D_F32

      public Vector2D_F32(float x, float y)
    • Vector2D_F32

      public Vector2D_F32()
    • Vector2D_F32

      public Vector2D_F32(Vector2D_F32 pt)
  • Method Details

    • createNewInstance

      public Vector2D_F32 createNewInstance()
      Description copied from class: GeoTuple

      Creates a new tuple instance of the same type.

      Specified by:
      createNewInstance in class GeoTuple<Vector2D_F32>
      Returns:
      new tuple instance.
    • copy

      public Vector2D_F32 copy()
      Description copied from class: GeoTuple_F32
      Generic copy routine. It is recommended that this be overridden with a faster implementation.
      Overrides:
      copy in class GeoTuple_F32<Vector2D_F32>
      Returns:
      An exact copy of this GeoTuple.
    • setTo

      public Vector2D_F32 setTo(Vector2D_F32 src)
      Description copied from class: GeoTuple
      Sets this equal to 'src'
      Overrides:
      setTo in class GeoTuple2D_F32<Vector2D_F32>
      Parameters:
      src - The tuple being copied
      Returns:
      Reference to 'this' class instance. Used to chain operations.
    • normalize

      public void normalize()
    • minus

      public void minus(Point2D_F32 a, Point2D_F32 b)
      In-place minus operation. this = a - b.
      Parameters:
      a - Point
      b - Point
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dot

      public float dot(Vector2D_F32 a)
      Dot product between this and 'a' = this.x * a.x + this.y * a.y
      Parameters:
      a - A vector
      Returns:
      dot product.
    • acute

      public float acute(Vector2D_F32 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'.