Class Vector


  • public final class Vector
    extends Object
    A 2D vector.
    • Constructor Detail

      • Vector

        public Vector​(float x,
                      float y)
    • Method Detail

      • getX

        public float getX()
        Returns the x magnitude.
      • getY

        public float getY()
        Returns the y magnitude.
      • scale

        public Vector scale​(float sxy)
        Returns a new vector scaled by both x and y.
        Parameters:
        sxy - x and y scale