summaryrefslogtreecommitdiffstats
path: root/balls.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-02 16:31:31 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-02 16:31:31 -0400
commitbaef318193316fc365ba4b0a559c387d96b4305a (patch)
tree771d8d32b5e3a85c418b0d23307bd3d14094c12c /balls.h
parent26ce765feb702c6d40f89a8cf50274869cdc35b4 (diff)
downloadballs-baef318193316fc365ba4b0a559c387d96b4305a.zip
refactor
Diffstat (limited to 'balls.h')
-rw-r--r--balls.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/balls.h b/balls.h
index 1a0038b..2cabd6e 100644
--- a/balls.h
+++ b/balls.h
@@ -1,5 +1,3 @@
-#include <stdlib.h>
-
typedef struct {
double x, y;
} Point;
@@ -26,6 +24,8 @@ Point ptSubVec(Point p, Vector v);
Point ptMulS(Point p, double s);
Point ptDivS(Point p, double s);
Point Pt(double x, double y);
+Rectangle insetRect(Rectangle r, double n);
+Point randPtInRect(Rectangle r);
Vector addVec(Vector v1, Vector v2);
Vector subVec(Vector v1, Vector v2);
@@ -37,9 +37,6 @@ double vecLen(Vector v);
Vector Vec(double x, double y);
Vector VecPt(Point p, Point q);
-Rectangle insetRect(Rectangle r, double n);
-Point randPtInRect(Rectangle r);
-
int isCollision(Point p1, double r1, Point p2, double r2);
void collideWall(Ball *b, Rectangle wall);
void collideBall(Ball *b1, Ball *b2);