#include <v2.h>
Public Methods | |
Constructors | |
| V2 (float x=0.f, float y=0.f) | |
| . | |
| V2 (const V2 &v) | |
| . | |
Initializers | |
| void | Set (float x, float y) |
| . | |
| void | Set (const V2 &v) |
| . | |
Overloaded operators | |
| V2 | operator+ (const V2 &v) const |
| . | |
| V2 | operator- (const V2 &v) const |
| . | |
| V2 | operator * (float d) const |
| . | |
| V2 | operator/ (float d) const |
| . | |
| void | operator+= (const V2 &v) |
| . | |
| void | operator-= (const V2 &v) |
| . | |
| void | operator *= (float d) |
| . | |
| void | operator/= (float d) |
| . | |
Operations | |
| float | PerpDot (const V2 &v) const |
| . | |
| float | Dot (const V2 &v) const |
| . | |
| float | Mag () const |
| . | |
| float | MagSquared () const |
| . | |
| V2 | GetNorm () const |
| . | |
| V2 & | Normalize () |
| . | |
| bool | Equals (const V2 &v, float eps=constants::Eps3) const |
| . | |
Static Public Attributes | |
| V2 | Axes [2] = { V2 (1.0f, 0.f) , V2 (0.f, 1.f) } |
| Cardinal Axes. | |
| V2 | O |
| Zero vector. | |
| V2 | Inf |
| Inifinite vector. | |
Union members: float x, y; float xy [2];
1.2.17