Class Vector2D

java.lang.Object
org.chsrobotics.lib.math.geometry.Vector3D
org.chsrobotics.lib.math.geometry.Vector2D
Direct Known Subclasses:
Vector1D

public class Vector2D extends Vector3D
Special case of a Vector3D in two dimensions.
  • Constructor Details

    • Vector2D

      public Vector2D(double x, double y)
      Constructs a 2-dimensional vector.
      Parameters:
      x - The X (i-hat, positive to the horizontal right on a graph) component of the vector.
      y - The Y (j-hat, positive up vertically on a graph) component of the vector.
  • Method Details

    • getZ

      public double getZ()
      Description copied from class: Vector3D
      Returns the Z (k-hat, positive out of the graph) component of the vector.
      Overrides:
      getZ in class Vector3D
      Returns:
      The signed Z component.