From 9991af973bd4cde3de1982dc390641fb357d6e57 Mon Sep 17 00:00:00 2001 From: John Honniball Date: Sun, 20 Sep 2020 12:18:27 +0100 Subject: [PATCH] Add a few function-level comments. --- reuleaux.c | 2 ++ star_grid.c | 2 ++ superellipse.c | 2 ++ ternary_arcs.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/reuleaux.c b/reuleaux.c index 121567a..79908f4 100644 --- a/reuleaux.c +++ b/reuleaux.c @@ -111,6 +111,8 @@ void plot_lr(const double x0, const double y0, const double width, const double } +/* reuleaux --- draw a Reuleaux polygon centred on (xc, yc) */ + void reuleaux(const double xc, const double yc, const double r, const int n, const bool drawSides) { /* https://en.wikipedia.org/wiki/Reuleaux_triangle */ diff --git a/star_grid.c b/star_grid.c index 53764eb..fadcdba 100644 --- a/star_grid.c +++ b/star_grid.c @@ -101,6 +101,8 @@ int main(int argc, char * const argv[]) } +/* draw_star --- draw a single star at (x0, y0) */ + void draw_star(const double x0, const double y0, const double gridsz, const double xc, const double yc, const int n) { int i; diff --git a/superellipse.c b/superellipse.c index e60a795..4e0f9c4 100644 --- a/superellipse.c +++ b/superellipse.c @@ -180,6 +180,8 @@ void plot_ur(const double xc, const double yc, const double r1, const double r2) } +/* superellipse --- draw a superellipse at (x0, y0) */ + void superellipse(const double x0, const double y0, const double a, const double b, const double theta, const double d) { const int npts = 72; diff --git a/ternary_arcs.c b/ternary_arcs.c index b31a97c..c9b1270 100644 --- a/ternary_arcs.c +++ b/ternary_arcs.c @@ -87,6 +87,8 @@ int main(int argc, char * const argv[]) } +/* draw_arcs --- draw arcs or lines at (x, y) */ + void draw_arcs(const double x, const double y, const double r, const char str[]) { moveto(x, y + r);