Pyrogenesis
13997
|
#include <FixedVector2D.h>
Public Member Functions | |
CFixedVector2D () | |
CFixedVector2D (fixed X, fixed Y) | |
bool | operator== (const CFixedVector2D &v) const |
Vector equality. More... | |
bool | operator!= (const CFixedVector2D &v) const |
Vector inequality. More... | |
CFixedVector2D | operator+ (const CFixedVector2D &v) const |
Vector addition. More... | |
CFixedVector2D | operator- (const CFixedVector2D &v) const |
Vector subtraction. More... | |
CFixedVector2D | operator- () const |
Negation. More... | |
CFixedVector2D & | operator+= (const CFixedVector2D &v) |
Vector addition. More... | |
CFixedVector2D & | operator-= (const CFixedVector2D &v) |
Vector subtraction. More... | |
CFixedVector2D | operator* (int n) const |
Scalar multiplication by an integer. More... | |
CFixedVector2D | Multiply (fixed n) const |
Multiply by a CFixed. More... | |
fixed | Length () const |
Returns the length of the vector. More... | |
int | CompareLength (fixed cmp) const |
Returns -1, 0, +1 depending on whether length is less/equal/greater than the argument. More... | |
int | CompareLength (const CFixedVector2D &other) const |
Returns -1, 0, +1 depending on whether length is less/equal/greater than the argument's length. More... | |
bool | IsZero () const |
void | Normalize () |
Normalize the vector so that length is close to 1. More... | |
void | Normalize (fixed n) |
Normalize the vector so that length is close to n. More... | |
fixed | Dot (const CFixedVector2D &v) |
Compute the dot product of this vector with another. More... | |
CFixedVector2D | Perpendicular () |
CFixedVector2D | Rotate (fixed angle) |
Rotate the vector by the given angle (anticlockwise). More... | |
Public Attributes | |
fixed | X |
fixed | Y |
Definition at line 24 of file FixedVector2D.h.
|
inline |
Definition at line 29 of file FixedVector2D.h.
Definition at line 30 of file FixedVector2D.h.
|
inline |
Returns -1, 0, +1 depending on whether length is less/equal/greater than the argument.
Avoids sqrting and overflowing.
Definition at line 118 of file FixedVector2D.h.
|
inline |
Returns -1, 0, +1 depending on whether length is less/equal/greater than the argument's length.
Avoids sqrting and overflowing.
Definition at line 141 of file FixedVector2D.h.
|
inline |
Compute the dot product of this vector with another.
Definition at line 195 of file FixedVector2D.h.
|
inline |
Definition at line 159 of file FixedVector2D.h.
|
inline |
Returns the length of the vector.
Will not overflow if the result can be represented as type 'fixed'.
Definition at line 95 of file FixedVector2D.h.
|
inline |
Multiply by a CFixed.
Likely to overflow if both numbers are large, so we use an ugly name instead of operator* to make it obvious.
Definition at line 86 of file FixedVector2D.h.
|
inline |
Normalize the vector so that length is close to 1.
If length is 0, does nothing.
Definition at line 168 of file FixedVector2D.h.
|
inline |
Normalize the vector so that length is close to n.
If length is 0, does nothing.
Definition at line 182 of file FixedVector2D.h.
|
inline |
Vector inequality.
Definition at line 39 of file FixedVector2D.h.
|
inline |
Scalar multiplication by an integer.
Definition at line 77 of file FixedVector2D.h.
|
inline |
Vector addition.
Definition at line 45 of file FixedVector2D.h.
|
inline |
Vector addition.
Definition at line 63 of file FixedVector2D.h.
|
inline |
Vector subtraction.
Definition at line 51 of file FixedVector2D.h.
|
inline |
Negation.
Definition at line 57 of file FixedVector2D.h.
|
inline |
Vector subtraction.
Definition at line 70 of file FixedVector2D.h.
|
inline |
Vector equality.
Definition at line 33 of file FixedVector2D.h.
|
inline |
Definition at line 209 of file FixedVector2D.h.
|
inline |
Rotate the vector by the given angle (anticlockwise).
Definition at line 217 of file FixedVector2D.h.
fixed CFixedVector2D::X |
Definition at line 27 of file FixedVector2D.h.
fixed CFixedVector2D::Y |
Definition at line 27 of file FixedVector2D.h.