net.dontdrinkandroot.visualization

## Class Vector

- java.lang.Object
- - java.awt.geom.Point2D
  - - java.awt.geom.Point2D.Double
    - - net.dontdrinkandroot.visualization.Vector

All Implemented Interfaces:
  Serializable, Cloneable

    public class Vector
    extends Point2D.Double

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.awt.geom.Point2D

`Point2D.Double, Point2D.Float`

### Field Summary

### Fields inherited from class java.awt.geom.Point2D.Double

`x, y`

### Constructor Summary

Constructors
Constructor and Description
`Vector()`
`Vector(double x, double y)`
`Vector(Point2D p)`
`Vector(Point2D p1, Point2D p2)`

### Method Summary

Methods
`Vector` `add(Point2D v2)`
`static double` `crossProduct(Point2D p1, Point2D p2, Point2D p3)`
`Vector` `divide(double factor)`
`Vector` `getAdded(Point2D v2)`
`double` `getLength()`
`Vector` `getNormalized()`
`Vector` `getScaled(double factor)`
`Vector` `getSubstractedFrom(Point2D v2)`
`Vector` `normalize()`
`Vector` `scale(double factor)`
`void` `setX(double x)`
`void` `setY(double y)`
`Vector` `substract(Point2D v2)`

### Methods inherited from class java.awt.geom.Point2D.Double

`getX, getY, setLocation, toString`

### Methods inherited from class java.awt.geom.Point2D

`clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation`

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

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Vector

    public Vector()

#### Vector

    public Vector(double x,
          double y)

#### Vector

    public Vector(Point2D p1,
          Point2D p2)

#### Vector

    public Vector(Point2D p)

### Method Detail

#### getLength

    public final double getLength()

#### getNormalized

    public final Vector getNormalized()

#### scale

    public final Vector scale(double factor)

#### getScaled

    public final Vector getScaled(double factor)

#### normalize

    public final Vector normalize()

#### add

    public final Vector add(Point2D v2)

#### getAdded

    public final Vector getAdded(Point2D v2)

#### substract

    public final Vector substract(Point2D v2)

#### getSubstractedFrom

    public final Vector getSubstractedFrom(Point2D v2)

#### divide

    public final Vector divide(double factor)

#### crossProduct

    public static final double crossProduct(Point2D p1,
                      Point2D p2,
                      Point2D p3)

#### setX

    public final void setX(double x)

#### setY

    public final void setY(double y)