|
| Vector2Tpl (Type s=0) |
| Default constructor. More...
|
|
| Vector2Tpl (Type _x, Type _y) |
| Constructor from a couple of coordinates. More...
|
|
Type | norm2 () const |
| Returns vector square norm.
|
|
Type | norm () const |
| Returns vector norm.
|
|
void | normalize () |
| Sets vector norm to unity.
|
|
Type | dot (const Vector2Tpl &v) const |
| Dot product.
|
|
Type | cross (const Vector2Tpl &v) const |
| Cross product. More...
|
|
Vector2Tpl & | operator- () |
| Inverse operator.
|
|
Vector2Tpl & | operator+= (const Vector2Tpl &v) |
| In-place addition operator.
|
|
Vector2Tpl & | operator-= (const Vector2Tpl &v) |
| In-place subtraction operator.
|
|
Vector2Tpl & | operator*= (Type v) |
| In-place multiplication (by a scalar) operator.
|
|
Vector2Tpl & | operator/= (Type v) |
| In-place division (by a scalar) operator.
|
|
Vector2Tpl | operator+ (const Vector2Tpl &v) const |
| Addition operator.
|
|
Vector2Tpl | operator- (const Vector2Tpl &v) const |
| Subtraction operator.
|
|
Vector2Tpl | operator* (Type s) const |
| Multiplication operator.
|
|
Vector2Tpl | operator/ (Type s) const |
| Division operator.
|
|
Type & | operator[] (unsigned i) |
| Direct coordinate access.
|
|
const Type & | operator[] (unsigned i) const |
| Direct coordinate access (const)
|
|
template<typename Type>
class Vector2Tpl< Type >
2D Vector