Class Vector

java.lang.Object
org.apache.pdfbox.util.Vector

public final class Vector extends Object
A 2D vector.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
     
    private final float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Vector(float x, float y)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the x magnitude.
    float
    Returns the y magnitude.
    scale(float sxy)
    Returns a new vector scaled by both x and y.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      private final float x
    • y

      private final float y
  • Constructor Details

    • Vector

      public Vector(float x, float y)
  • Method Details

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

      public String toString()
      Overrides:
      toString in class Object