summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-24 00:49:46 +0300
committerPaul Buetow <paul@buetow.org>2026-05-24 00:49:46 +0300
commit03b99440b6d1921b01580fe1752760c5fbd626df (patch)
tree051ce63d5b1a7d1ac003bfad99d73863134f1c78 /internal
parenta09ed05cd7410d4f52d5cd74103d0a0b9819e649 (diff)
fix(rpn): correct misleading ClearConstants comment
The previous comment contained a contradiction ('removes all constants' vs 'clears only user-defined') and incorrectly claimed built-in constants are 'preserved' (ReloadBuiltInConstants actually resets them to defaults, e.g. restoring pi if the user had overwritten it).
Diffstat (limited to 'internal')
-rw-r--r--internal/rpn/operations_constants.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/rpn/operations_constants.go b/internal/rpn/operations_constants.go
index fecf2f9..7fbd4c9 100644
--- a/internal/rpn/operations_constants.go
+++ b/internal/rpn/operations_constants.go
@@ -26,8 +26,7 @@ func (o *Operations) ListConstants() (string, error) {
return sb.String(), nil
}
-// ClearConstants removes all constants from storage.
-// Note: This clears only user-defined constants; built-in constants are preserved.
+// ClearConstants removes all user-defined constants and resets built-in constants to their default values.
// Usage: `clearconstants`
func (o *Operations) ClearConstants() {
o.consts.ReloadBuiltInConstants()