java.lang.Object
de.hamstersimulator.objectsfirst.datatypes.LocationVector

public final class LocationVector extends Object
A location vector is a vector in the mathematical sense. It can be used to describe a location relative to another location.
Author:
Steffen Becker
  • Constructor Details

    • LocationVector

      public LocationVector(int newDeltaRow, int newDeltaColumn)
      Creates a new location vector with the given vector deltas.
      Parameters:
      newDeltaRow - The delta in the row count. Can be any integer.
      newDeltaColumn - The delta in the column count. Can be any integer.
  • Method Details

    • getDeltaRow

      public int getDeltaRow()
      Returns:
      The delta of the row this vector describes.
    • getDeltaColumn

      public int getDeltaColumn()
      Returns:
      The delta of the column this vector describes.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object