Commit 43b5b15905550ff90a7ffd0869e10c519ae63ae3
1 parent
d6c861fa
Added comment to draw_bullet()
Showing
1 changed file
with
2 additions
and
0 deletions
07-tapered_bullet/cannon.c
@@ -66,6 +66,8 @@ void move_target(struct target *t) { | @@ -66,6 +66,8 @@ void move_target(struct target *t) { | ||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | +// draw isosceles trapezoid with the center of larger base at (x1,y1), center of smaller base at (x2,y2) | ||
70 | +// width - width of larger base, taper - ratio of smaller base to larger base | ||
69 | void draw_bullet(int x1, int y1, int x2, int y2, int width, double taper, int color) { | 71 | void draw_bullet(int x1, int y1, int x2, int y2, int width, double taper, int color) { |
70 | // define vector representing the central line | 72 | // define vector representing the central line |
71 | int dx = x2 - x1; | 73 | int dx = x2 - x1; |