From 111013b9ecb8b4208bfb1109e0f8ce8291fc90df Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 31 Oct 2024 19:53:25 -0400 Subject: remove gcc vector with struct --- rand.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'rand.c') diff --git a/rand.c b/rand.c index f070fd1..b679600 100644 --- a/rand.c +++ b/rand.c @@ -18,17 +18,11 @@ randFloat(float lo, float hi) { return lo + r*diff; } -float2 +Vector randPtInRect(Rectangle r) { - float2 pt = { - randFloat(r.min[0], r.max[0]), - randFloat(r.min[1], r.max[1]) + Vector pt = { + randFloat(r.min.x, r.max.x), + randFloat(r.min.y, r.max.y) }; return pt; } - -float2 -randVec(float xmin, float xmax, float ymin, float ymax) { - float2 v = {randFloat(xmin, xmax), randFloat(ymin, ymax)}; - return v; -} -- cgit v1.2.3