From 8b392132a495d56919629ec28163c7652e121312 Mon Sep 17 00:00:00 2001 From: LightningStalker Date: Thu, 17 Jun 2021 09:25:33 -0400 Subject: [PATCH] Update terminology, use M_PI --- iloc.c | 2 +- tankfreq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iloc.c b/iloc.c index 74fd479..b194b27 100644 --- a/iloc.c +++ b/iloc.c @@ -7,7 +7,7 @@ #include #include -#define u 1.2566370621219E-6 // µ - permeability of free space +#define u 1.2566370621219E-6 // µ - magnetic constant int main() { diff --git a/tankfreq.c b/tankfreq.c index 42eec9a..acdbc0b 100644 --- a/tankfreq.c +++ b/tankfreq.c @@ -8,8 +8,8 @@ int main (int argc, char **argv) { if (argc == 3) { - printf ("%f\n", 1 / (3.14159265358979324 * 2 * sqrt (atof(argv[1]) / - 1000000 * atof(argv[2]) / 1000000))); + printf ("%f\n", 1 / (M_PI * 2 * sqrt(atof(argv[1]) \ + * atof(argv[2]))) * 1000000); return (0); } else