CMU462::Vector2D Class Reference

Defines 2D vectors. More...

`#include <vector2D.h>`

Inheritance diagram for CMU462::Vector2D:

## Public Member Functions

| Vector2D ()
| Constructor. More...
| Vector2D (double x, double y)
| Constructor. More...
| Vector2D (const Vector2D &v)
| Constructor. More...
double | norm (void) const
| Returns norm.
double | norm2 (void) const
| Returns norm squared.
Vector2D | unit (void) const
| Returns unit vector parallel to this one.

## Detailed Description

Defines 2D vectors.

## Constructor & Destructor Documentation

CMU462::Vector2D::Vector2D | ( |  | ) |

inline

Constructor.

Initializes to vector (0,0).

CMU462::Vector2D::Vector2D | ( | double | x,
|  | double | y
| ) |  |

inline

Constructor.

Initializes to vector (a,b).

CMU462::Vector2D::Vector2D | ( | const Vector2D & | v | ) |

inline

Constructor.

Copy constructor. Creates a copy of the given vector.

The documentation for this class was generated from the following file:

- lib/vector2D.h