2 dimensional fixed point vector More...
Public Member Functions | |
| void | Zero (void) |
| Initialize the vector elements to zero. | |
| void | One (void) |
| Initialize the vector elements to 1.0f (Fixed) | |
| fixed16_16_t | GetX (void) const |
| Return the x component of the vector. | |
| fixed16_16_t | GetY (void) const |
| Return the y component of the vector. | |
| void | SetX (fixed16_16_t fX) |
| Set the x component of the vector. | |
| void | SetY (fixed16_16_t fY) |
| Set the y component of the vector. | |
| void | Set (fixed16_16_t fX, fixed16_16_t fY) |
| Initialize the vector elements to specific values,. | |
| void | Negate (void) |
| Negate a 2D vector. | |
| void | Negate (fixed16_16_t fX, fixed16_16_t fY) |
| Negate the input and store it in this structure. | |
| void | Negate (const FixedVector2D_t *pInput) |
| Make a copy of the input after it's been negated. | |
Public Attributes | |
| fixed16_16_t | x |
| 32 bit fixed point X value for the 2D Vector | |
| fixed16_16_t | y |
| 32 bit fixed point Y value for the 2D Vector | |
2 dimensional fixed point vector
This 8 byte vector contains x and y 32 bit fixed point coordinates. A set of common functions for simple 2 dimensional math are part of the structure.
It is expected to be 4 byte aligned and use scalar math. The members are hard coded to be "x" and "y" for maximum compatibility
|
inline |
Return the x component of the vector.
|
inline |
Return the y component of the vector.
|
inline |
Make a copy of the input after it's been negated.
Copy the input data and negate it.
| pInput | Valid pointer to a FixedVector2D_t structure to copy and negate |
|
inline |
Negate the input and store it in this structure.
Set the x and y value to -fX and -fY respectively
| fX | X value to negate |
| fY | Y value to negate |
|
inline |
Negate a 2D vector.
Set the x and y value to -x and -y respectively
|
inline |
Initialize the vector elements to 1.0f (Fixed)
Fills in all of the entries with zero, thereby initializing the structure to a known state.
|
inline |
Initialize the vector elements to specific values,.
Given the new values for x and y, store them into the structure.
| fX | The new x component to store in the vector. |
| fY | The new y component to store in the vector. |
|
inline |
Set the x component of the vector.
| fX | The new x component of the vector. |
|
inline |
Set the y component of the vector.
| fY | The new y component of the vector. |
|
inline |
Initialize the vector elements to zero.
Fills in all of the entries with zero, thereby initializing the structure to a known state.
| fixed16_16_t Burger::FixedVector2D_t::x |
32 bit fixed point X value for the 2D Vector
| fixed16_16_t Burger::FixedVector2D_t::y |
32 bit fixed point Y value for the 2D Vector