aboutsummaryrefslogtreecommitdiffhomepage
path: root/test.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-01 13:01:11 +0200
committerlemon <lsof@mailbox.org>2023-06-01 13:01:11 +0200
commita98075934ece8c7ff351f8449f6515c12b9feec8 (patch)
tree05ee8b8f4e6119b693b2460b4761cf3166b79637 /test.c
parent82cac0ae5d4e335719445857ab16ffdf05413222 (diff)
struct args and return
Diffstat (limited to 'test.c')
-rw-r--r--test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test.c b/test.c
index 5bb4e72..83a9d8b 100644
--- a/test.c
+++ b/test.c
@@ -63,4 +63,13 @@ int hmm(float x, int a, char *p, char *q) {
return x > 1 ? a || p : p < q && a > 0;
}
+struct v2f { float x, y; };
+
+struct v2f add(struct v2f a, struct v2f b) {
+ struct v2f r;
+ r.x = a.x + b.x;
+ r.y = a.y + b.y;
+ return r;
+}
+
//