summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-01-17 13:07:15 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-01-17 13:07:15 +0100
commita05631b599a587e89cd2d882cd2513328e78d82e (patch)
treec9c35070efe9c3036edf7669e91fc15e007784f2
parent5fbb165aa0995431d6d4ee30e9c68b5d347720c1 (diff)
downloadcurl-a05631b599a587e89cd2d882cd2513328e78d82e.tar.gz
fixup: add the sine wave generator code in a comment
-rw-r--r--src/tool_cb_prg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index 88c6c4892..7d9fb333e 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -35,7 +35,13 @@
#include "memdebug.h" /* keep this as LAST include */
-/* 200 values */
+/* 200 values generated by this perl code:
+
+ my $pi = 3.1415;
+ foreach my $i (1 .. 200) {
+ printf "%d, ", sin($i/200 * 2 * $pi) * 5000 + 5000;
+ }
+*/
static const unsigned int sinus[] = {
5157, 5313, 5470, 5626, 5782, 5936, 6090, 6243, 6394, 6545, 6693, 6840, 6985,
7128, 7269, 7408, 7545, 7679, 7810, 7938, 8064, 8187, 8306, 8422, 8535, 8644,