From 5b560599f951cec1d88f86824912bc5241fe6d08 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Mon, 28 Oct 2024 10:34:43 -0400 Subject: set initial positions --- balls.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 balls.h (limited to 'balls.h') diff --git a/balls.h b/balls.h new file mode 100644 index 0000000..7c9a8ca --- /dev/null +++ b/balls.h @@ -0,0 +1,9 @@ +typedef float float2 __attribute__ ((vector_size (2*sizeof(float)))); + +typedef struct { + float2 min, max; +} Rectangle; + +int isCollision(float2 p1, float r1, float2 p2, float r2); +Rectangle insetRect(Rectangle r, float n); +float2 randPtInRect(Rectangle r); -- cgit v1.2.3