org.apache.pdfbox.util

## Class Vector

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

    public final class Vector
    extends Object

A 2D vector.

Author:
  John Hewson

### Constructor Summary

Constructors
Constructor and Description
`Vector(float x, float y)`

### Method Summary

All Methods Instance Methods Concrete Methods
`float` `getX()` Returns the x magnitude.
`float` `getY()` Returns the y magnitude.
`Vector` `scale(float sxy)` Returns a new vector scaled by both x and y.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Vector

    public Vector(float x,
                  float y)

### Method Detail

#### getX

    public float getX()

Returns the x magnitude.

Returns:
  the x magnitude

#### getY

    public float getY()

Returns the y magnitude.

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
Returns:
  a new vector scaled by both x and y

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`