Two dimensional Vector Class.
More...
#include <matrix3.h>
List of all members.
Public Member Functions |
double & | operator() (int idx) |
| Access Elements.
|
Vector2 | operator* (double v) |
| Vector multiplication with a scalar.
|
Vector2 & | operator*= (double v) |
| Vector multiplication with a Scalar and output into itself.
|
Vector2 & | operator+= (double v) |
| Adding a Scalar to a Vector and output into itself.
|
Vector2 & | operator+= (const Vector2 &v) |
| Vector Addition and output into itself.
|
Vector2 & | operator= (double v) |
| Set Vector with one scalar value.
|
double & | operator[] (int idx) |
| Access Elements.
|
double | operator[] (int idx) const |
| Access Elements.
|
| Vector2 () |
| Constructor.
|
Public Attributes |
double | x [2] |
| Storage or the two dimensions.
|
Friends |
std::ostream & | operator<< (std::ostream &os, const Vector2 &v) |
| Print out a vector.
|
Detailed Description
Two dimensional Vector Class.
Definition at line 40 of file matrix3.h.
Constructor & Destructor Documentation
Member Function Documentation
double& Vector2::operator() |
( |
int |
idx | ) |
[inline] |
Access Elements.
- Parameters:
-
- Returns:
- Value
Definition at line 70 of file matrix3.h.
Vector2 Vector2::operator* |
( |
double |
v | ) |
[inline] |
Vector multiplication with a scalar.
- Parameters:
-
- Returns:
- Result Vector
Definition at line 78 of file matrix3.h.
Vector2& Vector2::operator*= |
( |
double |
v | ) |
[inline] |
Vector multiplication with a Scalar and output into itself.
- Parameters:
-
- Returns:
- Result Vector
Definition at line 99 of file matrix3.h.
Vector2& Vector2::operator+= |
( |
double |
v | ) |
[inline] |
Adding a Scalar to a Vector and output into itself.
- Parameters:
-
- Returns:
- Result Vector
Definition at line 109 of file matrix3.h.
Vector Addition and output into itself.
- Parameters:
-
- Returns:
- Result Vector
Definition at line 119 of file matrix3.h.
Vector2& Vector2::operator= |
( |
double |
v | ) |
[inline] |
Set Vector with one scalar value.
- Parameters:
-
- Returns:
- Result Vector
Definition at line 89 of file matrix3.h.
double& Vector2::operator[] |
( |
int |
idx | ) |
[inline] |
Access Elements.
- Parameters:
-
- Returns:
- Value
Definition at line 54 of file matrix3.h.
double Vector2::operator[] |
( |
int |
idx | ) |
const [inline] |
Access Elements.
- Parameters:
-
- Returns:
- Value
Definition at line 62 of file matrix3.h.
Friends And Related Function Documentation
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Vector2 & |
v |
|
) |
| [friend] |
Print out a vector.
- Parameters:
-
- Returns:
- print out
Definition at line 130 of file matrix3.h.
Member Data Documentation
Storage or the two dimensions.
Definition at line 43 of file matrix3.h.
The documentation for this class was generated from the following file: