summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--balls.c2
-rw-r--r--balls.h8
-rw-r--r--geo.c6
-rw-r--r--rand.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/balls.c b/balls.c
index a4c3fb2..2a7a413 100644
--- a/balls.c
+++ b/balls.c
@@ -33,7 +33,7 @@ enum {
CIRCLE_POINTS = 32+2, /* +2 for center point and last point which overlaps with first point. */
};
-const Rectangle bounds = { {-1.0, -1.0}, {1.0, 1.0} };
+const Rect bounds = { {-1.0, -1.0}, {1.0, 1.0} };
void initGL(int argc, char *argv[]);
void initCL(void);
diff --git a/balls.h b/balls.h
index d796e5c..21d8bc1 100644
--- a/balls.h
+++ b/balls.h
@@ -4,7 +4,7 @@ typedef struct {
typedef struct {
Vector min, max;
-} Rectangle;
+} Rect;
/*
* A partition of the set of all possible collisions between pairs of balls.
@@ -24,8 +24,8 @@ void freePartition(Partition part);
void printPartition(Partition part);
int isCollision(Vector p1, float r1, Vector p2, float r2);
-Rectangle insetRect(Rectangle r, float n);
-Vector *noOverlapPositions(int n, Rectangle bounds, float radius);
+Rect insetRect(Rect r, float n);
+Vector *noOverlapPositions(int n, Rect bounds, float radius);
float randFloat(float lo, float hi);
-Vector randPtInRect(Rectangle r);
+Vector randPtInRect(Rect r);
diff --git a/geo.c b/geo.c
index 976b668..84ae2cb 100644
--- a/geo.c
+++ b/geo.c
@@ -13,8 +13,8 @@ isCollision(Vector p1, float r1, Vector p2, float r2) {
return (dx*dx + dy*dy) <= rhs*rhs;
}
-Rectangle
-insetRect(Rectangle r, float n) {
+Rect
+insetRect(Rect r, float n) {
r.min.x += n;
r.min.y += n;
@@ -26,7 +26,7 @@ insetRect(Rectangle r, float n) {
/* Generate n circle coordinates within bounds such that no circles overlap. */
Vector *
-noOverlapPositions(int n, Rectangle bounds, float radius) {
+noOverlapPositions(int n, Rect bounds, float radius) {
Vector *ps;
int i, j;
diff --git a/rand.c b/rand.c
index b679600..4722ef5 100644
--- a/rand.c
+++ b/rand.c
@@ -19,7 +19,7 @@ randFloat(float lo, float hi) {
}
Vector
-randPtInRect(Rectangle r) {
+randPtInRect(Rect r) {
Vector pt = {
randFloat(r.min.x, r.max.x),
randFloat(r.min.y, r.max.y)