aboutsummaryrefslogtreecommitdiffhomepage
path: root/test2.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-04 13:15:15 +0200
committerlemon <lsof@mailbox.org>2023-06-04 13:15:15 +0200
commitd8f63a7c8f9ec6c1213e219d4b6d5d30ce595cdd (patch)
tree84f2f383fcd129332b3a0a6a7bb85666e7569934 /test2.c
parent45cd3d8d6eeccc42f7e0b23f7871b29f3ce6f7e7 (diff)
evaluate call args backwards
Diffstat (limited to 'test2.c')
-rw-r--r--test2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test2.c b/test2.c
new file mode 100644
index 0000000..13ed47c
--- /dev/null
+++ b/test2.c
@@ -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;
+}