Public Types | |
typedef double | value_type |
Public Member Functions | |
Vec2d () | |
Vec2d (value_type x, value_type y) | |
Vec2d (const Vec2f &vec) | |
operator Vec2f () const | |
bool | operator== (const Vec2d &v) const |
bool | operator!= (const Vec2d &v) const |
bool | operator< (const Vec2d &v) const |
value_type * | ptr () |
const value_type * | ptr () const |
void | set (value_type x, value_type y) |
value_type & | operator[] (int i) |
value_type | operator[] (int i) const |
value_type & | x () |
value_type & | y () |
value_type | x () const |
value_type | y () const |
bool | valid () const |
bool | isNaN () const |
value_type | operator * (const Vec2d &rhs) const |
const Vec2d | operator * (value_type rhs) const |
Vec2d & | operator *= (value_type rhs) |
const Vec2d | operator/ (value_type rhs) const |
Vec2d & | operator/= (value_type rhs) |
const Vec2d | operator+ (const Vec2d &rhs) const |
Vec2d & | operator+= (const Vec2d &rhs) |
const Vec2d | operator- (const Vec2d &rhs) const |
Vec2d & | operator-= (const Vec2d &rhs) |
const Vec2d | operator- () const |
value_type | length () const |
value_type | length2 (void) const |
value_type | normalize () |
Public Attributes | |
value_type | _v [2] |
|
|
|
|
|
|
|
|
|
|
|
Length of the vector = sqrt( vec . vec ) |
|
Length squared of the vector = vec . vec |
|
Normalize the vector so that it has length unity. Returns the previous length of the vector. |
|
Multiply by scalar. |
|
Dot product. |
|
Unary multiply by scalar. |
|
|
|
|
|
Binary vector add. |
|
Unary vector add. Slightly more efficient because no temporary intermediate object. |
|
Negation operator. Returns the negative of the Vec2d. |
|
Binary vector subtract. |
|
Unary vector subtract. |
|
Divide by scalar. |
|
Unary divide by scalar. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|