diff options
Diffstat (limited to 'test2.c')
| -rw-r--r-- | test2.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +typedef struct v2d { double x,y; } v2d; + + + +void addp(v2d *a, const v2d *b) +{ + a->x += b->x; + a->y += b->y; +} + +v2d add(v2d a, v2d b) +{ + addp(&a, &b); + return a; +} |