diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 00:00:12 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 00:00:12 +0300 |
| commit | 6dc8b270e212c2ce41b6179dc17dd8160a6d148a (patch) | |
| tree | b24ac1ddd2f9631f5172116b6c17798258209bea | |
| parent | cb2668bc57fb205fbd44b77695d36d019a7e1054 (diff) | |
fix(rpn): clarify nm/nanometer comment in metric_builtin.go
The original comment misleadingly suggested that nanometers could be
added as 'nm' in a separate metric registration, but 'nm' is already
registered as the nautical mile abbreviation. Reword to clarify that
nanometer support is intentionally excluded and suggest scientific
notation as the alternative.
| -rw-r--r-- | internal/rpn/metric_builtin.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/rpn/metric_builtin.go b/internal/rpn/metric_builtin.go index 0db5bd9..ba58967 100644 --- a/internal/rpn/metric_builtin.go +++ b/internal/rpn/metric_builtin.go @@ -266,9 +266,9 @@ func registerBuiltInMetrics(r *MetricRegistry) { 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. + // Nanometer support is intentionally excluded to avoid ambiguity + // with the nautical mile abbreviation. Use scientific notation + // (1e-9m) directly if nanometer precision is needed. r.Register(&Metric{ Name: "nm", Category: Distance, |
