diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-10-31 19:53:25 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-10-31 19:53:25 -0400 |
| commit | 111013b9ecb8b4208bfb1109e0f8ce8291fc90df (patch) | |
| tree | db67132d08569ade41c50b9e8948df3b094095d0 /rand.c | |
| parent | 8a3994c5f6fd7023b5bdff9a02bc1f0ba110f12f (diff) | |
| download | balls-111013b9ecb8b4208bfb1109e0f8ce8291fc90df.zip | |
remove gcc vector with struct
Diffstat (limited to 'rand.c')
| -rw-r--r-- | rand.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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; -} |