Class Vector


  • public class Vector
    extends java.lang.Object
    Represents a vector, a movement in 2d.
    • Constructor Summary

      Constructors 
      Constructor Description
      Vector​(int x, int y)
      New vector with the given x and y coordinates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getX()
      Get coordinate on x axis.
      int getY()
      Get coordinate on y axis
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Vector

        public Vector​(int x,
                      int y)
        New vector with the given x and y coordinates.
        Parameters:
        x -
        y -
    • Method Detail

      • getX

        public int getX()
        Get coordinate on x axis.
        Returns:
        Coordinate on x axis.
      • getY

        public int getY()
        Get coordinate on y axis
        Returns:
        Coordinate on y axis.