|
Public Member Functions |
| | point (POINT_TYPE, POINT_TYPE, MATH_TYPE m=INT_MATH) |
| | Constructor for x,y.
|
| | point (const point &) |
| | copy constructor
|
| | point (MATH_TYPE=INT_MATH) |
| | default constructor
|
| POINT_TYPE | x (void) const |
| | Retruns X coordinate.
|
| POINT_TYPE | y (void) const |
| | Returns Y coordinate.
|
| void | set (POINT_TYPE, POINT_TYPE) |
| | Sets the points x,y coordinate. No scaling.
|
| void | FPset (POINT_TYPE ix, POINT_TYPE iy) |
| | Will scale values of ix,iy to fixed point if needed.
|
| void | set (const point &) |
| | set a point to another point
|
| MATH_TYPE | math (void) const |
| | Return what kind of math is involved.
|
Private Attributes |
| POINT_TYPE | _x |
| POINT_TYPE | _y |
| MATH_TYPE | _math |
Friends |
| const point | operator- (const point &first, const point &second) |
| const point | operator+ (const point &first, const point &second) |
The default is integer math if nothing is specified. Serves two functions: 1. Allows easy intialization of fixed point like: point(3,4,FIXED_MATH); 2. Allows libraries that use point with fixed point to ensure that the point provided is a fixed point value where required.