#include <Fxp.h>
Public Member Functions | |
| SfxpCoord (FxpFloat xin, FxpFloat yin) | |
| Floating point constructor. | |
| SfxpCoord (int xin=0, int yin=0) | |
| Integer constructor. | |
| bool | operator== (SfxpCoord &coord) |
| Comparison operator. | |
| bool | operator!= (SfxpCoord &coord) |
| Comparison operator. | |
| SfxpCoord | operator+ (SfxpCoord coord) |
| Vector addition operator. | |
| SfxpCoord | operator- (SfxpCoord coord) |
| Vector subtraction operator. | |
| SfxpCoord | operator+= (SfxpCoord coord) |
| Adds passed vector to stored vector. | |
| SfxpCoord | FxpScalar (Sfxp val) |
| Multiplies the vector by a signed fixed point scalar value. | |
| Afxp | Trajectory () |
| Returns the angle it's pointing at. Valid for all angles. | |
| SfxpCoord | IntScalar (int val) |
| Multiplies the vector by a signed fixed-point integer value. | |
| bool | MajorDigitsEqual (SfxpCoord coord) const |
| Returns true if the truncated integer portions match. | |
| int | X () const |
| Returns the truncated integer portion of the X coordinate. | |
| int | Y () const |
| Returns the truncated integer portion of the Y coordinate. | |
| int | Xfxp () const |
| Returns the raw fixed-point X coordinate. | |
| int | Yfxp () const |
| Returns the raw fixed-point Y coordinate. | |
| FxpFloat | Xfloat () |
| Returns the X coordinate, converted to floating point. | |
| FxpFloat | Yfloat () |
| Returns the Y coordinate, converted to floating point. | |
| SfxpCoord | SetFloat (FxpFloat xin, FxpFloat yin) |
| Sets X and Y coordinates, converting from floating point. | |
| SfxpCoord | SetFxp (Sfxp xin, Sfxp yin) |
| Sets X and Y coordinates from raw fixed point values. | |
| SfxpCoord | SetInt (Sint32 xin, Sint32 yin) |
| Initializes coordinates, converting from integer values. | |
| int | Nonzero () |
| Returns zero if the vector is zero in magnitude. | |
| void | Vector (Sfxp magnitude, Afxp angle) |
| Initializes coordinates to the specified angle and magnitude. | |
| Sfxp | Magnitude () |
| Returns the magnitude of the vector. Not 100% fixed-point yet. | |
Definition at line 141 of file Fxp.h.
1.3.4