Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Vector

    java.lang.Object
      |
      +--Vector

public class Vector
extends java.lang.Object

This class stores 2-dimensional Vector. Coordinates are double x1, x2

Constructor Summary
`Vector()` Constructs zero vector (0,0)
`Vector(double x1, double x2)` Constructs vector (x1,x2)

Method Summary
`static Vector` | `cart_2_pol(Vector v1)` Converts vector in caretsian coordinates into vector in polar coordinates
`static Vector` | `minus(Vector v1, Vector v2)` Substracts vector v1 - v2
`static Vector` | `pol_2_cart(Vector v1)` Converts vector in polar coordinates into vector in cartesian coordinates

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Vector

    public Vector()

  Constructs zero vector (0,0)

### Vector

    public Vector(double x1,
                  double x2)

  Constructs vector (x1,x2)
  Parameters:
    `x1` - x coordinate
    `x2` - y coordinate

Method Detail

### minus

    public static Vector minus(Vector v1,
                               Vector v2)

  Substracts vector v1 - v2
  Parameters:
    `v1` - first vector
    `v2` - second vector
  Returns:
    Vector (v1 - v2)

### cart_2_pol

    public static Vector cart_2_pol(Vector v1)

  Converts vector in caretsian coordinates into vector in polar coordinates
  Parameters:
    `v1` - vector in cartesian coord.
  Returns:
    vector in polar coord.

### pol_2_cart

    public static Vector pol_2_cart(Vector v1)

  Converts vector in polar coordinates into vector in cartesian coordinates
  Parameters:
    `v1` - vector in polar coord.
  Returns:
    vector in cartesian coord.

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD