From a98075934ece8c7ff351f8449f6515c12b9feec8 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 1 Jun 2023 13:01:11 +0200 Subject: struct args and return --- test.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test.c') 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; +} + // -- cgit v1.2.3