aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test2.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-09 20:29:49 +0200
committerlemon <lsof@mailbox.org>2025-10-09 20:30:02 +0200
commit0cb0dd0d23386a6a6ff4e981bb633b9e34a87c65 (patch)
tree8aec6f43b6126e5d63afcd8a1c054e8821d14416 /test/test2.c
parentba05bc9089248fc92a2fa12bace04c7f63649b9a (diff)
update todo.txt
Diffstat (limited to 'test/test2.c')
-rw-r--r--test/test2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test2.c b/test/test2.c
index 26def98..756b0d3 100644
--- a/test/test2.c
+++ b/test/test2.c
@@ -14,6 +14,11 @@ v2d add(v2d a, v2d b)
return a;
}
+v2d addx(v2d a, v2d b)
+{
+ return (v2d){a.x+b.x, a.y+b.y};
+}
+
short s(int a, int b) {
extern h();
h(a +a * a);
@@ -25,7 +30,7 @@ int i() {
return s(1,2);
}
-double v2v2() {
+v2d v2v2() {
v2d x = add((v2d){1,2}, (v2d){3,4});
- return x.x+x.y;
+ return x;
}