|
PARTONS/NumA++
|
Numerical Analysis C++ routines
|
![]() |
Object representing a two-dimensional vector. More...
Public Member Functions | |
| Vector2D () | |
| Default constructor. More... | |
| Vector2D (double x, double y) | |
| Constructor. More... | |
| ~Vector2D () | |
| Default destructor. More... | |
| double | getX () const |
| void | setX (double x) |
| double | getY () const |
| void | setY (double y) |
| Vector2D | operator+ (Vector2D const &rhs) |
| Addition of two vectors. More... | |
| void | operator+= (Vector2D const &rhs) |
| Addition with a scalar. More... | |
| Vector2D | operator- (Vector2D const &rhs) |
| Subtraction of two vectors. More... | |
| void | operator-= (Vector2D const &rhs) |
| Subtraction with a scalar. More... | |
Private Attributes | |
| double | m_x |
| x-coordinate. More... | |
| double | m_y |
| y-coordinate. More... | |
Object representing a two-dimensional vector.
| NumA::Vector2D::Vector2D | ( | ) |
Default constructor.
| NumA::Vector2D::Vector2D | ( | double | x, |
| double | y | ||
| ) |
Constructor.
| x | x-coordinate. |
| y | y-coordinate. |
| NumA::Vector2D::~Vector2D | ( | ) |
Default destructor.
| double NumA::Vector2D::getX | ( | ) | const |
| double NumA::Vector2D::getY | ( | ) | const |
| void NumA::Vector2D::operator+= | ( | Vector2D const & | rhs | ) |
Addition with a scalar.
| rhs | Scalar. |
| void NumA::Vector2D::operator-= | ( | Vector2D const & | rhs | ) |
Subtraction with a scalar.
| rhs | Scalar. |
| void NumA::Vector2D::setX | ( | double | x | ) |
| x | x-coordinate. |
| void NumA::Vector2D::setY | ( | double | y | ) |
| y | y-coordinate. |
|
private |
x-coordinate.
|
private |
y-coordinate.