From c705ae942573984784ef501bf8198f61f5206ddd Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 05:27:10 -0400 Subject: refactor: simplify yaml, remove support for old scalar fields --- internal/engine/tick.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'internal/engine') diff --git a/internal/engine/tick.go b/internal/engine/tick.go index 7a422af..ff1bace 100644 --- a/internal/engine/tick.go +++ b/internal/engine/tick.go @@ -116,3 +116,24 @@ func ToTicks(base float64) int { } return floor } + +func ValuesEqual(a, b any) bool { + ai, aok := NumericValue(a) + bi, bok := NumericValue(b) + if aok && bok { + return ai == bi + } + return a == b +} + +func NumericValue(v any) (float64, bool) { + switch x := v.(type) { + case int: + return float64(x), true + case int64: + return float64(x), true + case float64: + return x, true + } + return 0, false +} -- cgit v1.2.3