blob: 5c694220bcccb49463be59f301800c40661d6ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "types.h"
#include "fixed.h"
#ifndef POINT_H
#define POINT_H
typedef struct POINT {
FIXED x;
FIXED y;
} ALIGN(4) POINT;
static inline POINT createPoint (FIXED x, FIXED y) {
// Create a point from data
POINT temp;
temp.x = x;
temp.y = y;
return temp;
}
static inline POINT addPoint (POINT *a, POINT *b) {
// Add two points
POINT temp;
temp.x = a->x + b->x;
temp.y = a->y + b->y;
return temp;
}
#endif // POINT_H
|