summaryrefslogtreecommitdiffstats
path: root/balls.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-02 16:47:32 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-02 16:47:32 -0400
commitb45a78b60136c3887430d309d2f78ed972c1fbc8 (patch)
tree062b25be94a633c922c26061f91afe7620eade27 /balls.h
parent419c88ca227949f675eb10a38b253a8702b74ebe (diff)
downloadballs-b45a78b60136c3887430d309d2f78ed972c1fbc8.zip
ball colors
Diffstat (limited to 'balls.h')
-rw-r--r--balls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/balls.h b/balls.h
index 73ab14c..3d0202c 100644
--- a/balls.h
+++ b/balls.h
@@ -11,10 +11,15 @@ typedef struct {
} Vector;
typedef struct {
+ float r, g, b;
+} Color;
+
+typedef struct {
Point p; /* position [m] */
Vector v; /* velocity [m/s] */
double r; /* radius [m] */
double m; /* mass [kg] */
+ Color color;
} Ball;
Point addPt(Point p, Point q);