Compare commits

...
2 Commits
Author SHA1 Message Date
aclist a419aad160 chore: move comments 2025-10-31 10:05:21 +09:00
aclist 21d4601e41 chore: add comments about pretty printing 2025-10-31 10:01:46 +09:00
+4 -1
View File
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <stdio.h>
// Earths radius in meters
// Earth's radius in meters.
#define RADIUS ((12756L / 2.0L) * 1000L)
// PI natural constant
@@ -68,6 +68,9 @@ int main(int argc, const char* argv[]) {
.longitude = radian_from(atof(argv[4])),
};
// Returns the distance in meters.
// To pretty-print the result in a consumer of this module, it is
// recommended to divide the result by 1,000 and round it.
printf("%.1f\n", great_circle_distance(a, b));
return 0;