X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Flinogram.cpp;h=16e78ad343747faade392e99942bca60d3f58460;hp=a244c0d9477015b5978d89b16f84b0d0fa72b91d;hb=52b5db7fecd29a8ffe42c53e4e27fd2a698075bb;hpb=fad03eb65e23652bb5ff46335d011413cccf03d5 diff --git a/tools/linogram.cpp b/tools/linogram.cpp index a244c0d..16e78ad 100644 --- a/tools/linogram.cpp +++ b/tools/linogram.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: linogram.cpp,v 1.1 2003/04/01 18:34:42 kevin Exp $ +** $Id: linogram.cpp,v 1.2 2003/04/01 18:56:59 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -27,7 +27,7 @@ #include "ct.h" -enum { O_LABELS,, O_VERBOSE, O_HELP, O_VERSION, O_DEBUG }; +enum { O_LABELS, O_VERBOSE, O_HELP, O_VERSION, O_DEBUG }; static struct option my_options[] = { @@ -38,7 +38,7 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: linogram.cpp,v 1.1 2003/04/01 18:34:42 kevin Exp $"; +static const char* g_szIdStr = "$Id: linogram.cpp,v 1.2 2003/04/01 18:56:59 kevin Exp $"; void @@ -57,7 +57,6 @@ linogram_usage (const char *program) int linogram_main (int argc, char *const argv[]) { - std::string in_n; int opt_verbose = 0; int opt_debug = 0; @@ -98,16 +97,16 @@ linogram_main (int argc, char *const argv[]) return (1); } - in_n = argv[optind]; - in_d = argv[optind+1]; + const char* in_n = argv[optind]; + const char* in_d = argv[optind+1]; int n = atol (in_n); - double n = atof (in_d); + double d = atof (in_d); int size = 2 * (2 * n - 1) + 1; double divisor = 4 * n + 3; for (int itheta = 0; itheta < size; itheta++) { - double theta = atan (2 * itheta / division); + double theta = atan (2 * itheta / divisor); printf ("%lf: ", theta); double step = d * cos(theta); for (int id = 0; id < size; id++) {