Class Vector2D_F64

All Implemented Interfaces:
Serializable

public class Vector2D_F64
extends GeoTuple2D_F64<Vector2D_F64>
Spacial vector in 2D
See Also:
Serialized Form
  • Constructor Details

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

    • createNewInstance

      public Vector2D_F64 createNewInstance()
      Description copied from class: GeoTuple

      Creates a new tuple instance of the same type.

      Specified by:
      createNewInstance in class GeoTuple<Vector2D_F64>
      Returns:
      new tuple instance.
    • set

      public void set​(Vector2D_F64 orig)
    • copy

      public Vector2D_F64 copy()
      Description copied from class: GeoTuple_F64
      Generic copy routine. It is recommended that this be overridden with a faster implementation.
      Overrides:
      copy in class GeoTuple_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 - Point
      b - Point
    • toString

      public String toString()
      Overrides:
      toString in class 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'.