diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-22 11:27:44 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-22 11:27:44 +0300 |
| commit | 71df733f42f50d0ea99392dab4b1e90aa1396e84 (patch) | |
| tree | 7cf6273371000edc9e937699cda3db1fdc4c0d09 | |
| parent | 468566e6635d9b716f2d8e4e3eb4b08c028f4b15 (diff) | |
docs(rpn): document nm metric choice (nautical mile vs nanometer)
Add comment explaining that 'nm' means nautical mile (1852 m) in this
codebase, not nanometer. Documents the rationale and alternative.
| -rw-r--r-- | internal/rpn/metric_builtin.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/rpn/metric_builtin.go b/internal/rpn/metric_builtin.go index bc38950..a876852 100644 --- a/internal/rpn/metric_builtin.go +++ b/internal/rpn/metric_builtin.go @@ -258,6 +258,10 @@ func registerBuiltInMetrics(r *MetricRegistry) { Factor: func(PrefixMode) float64 { return 0.0254 }, IsRate: false, }) + // nm = nautical mile (1852 m), not nanometer. + // Nanometer support (nm = 1e-9 m) is not included to avoid ambiguity. + // If nanometers are needed, they can be added as "nm" in a separate + // metric registration or use scientific notation (1e-9m) directly. r.Register(&Metric{ Name: "nm", Category: Distance, |
