summaryrefslogtreecommitdiffstats
path: root/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'rand.c')
-rw-r--r--rand.c14
1 files changed, 4 insertions, 10 deletions
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;
-}