refactor: group uuid instead of index

This commit is contained in:
IliaDenisov
2026-02-10 20:54:43 +03:00
parent 6c8384ce7a
commit 56998d4c2d
26 changed files with 333 additions and 363 deletions
-8
View File
@@ -1,7 +1,6 @@
package number
import (
"cmp"
"math"
)
@@ -21,10 +20,3 @@ func fixed(num float64, precision int) float64 {
func round(num float64) int {
return int(num + math.Copysign(0.5, num))
}
func Max[T cmp.Ordered](x, y T) T {
if cmp.Compare(x, y) == 1 {
return x
}
return y
}
-7
View File
@@ -31,10 +31,3 @@ func TestFixed(t *testing.T) {
})
}
}
func TestMax(t *testing.T) {
assert.Equal(t, 10., Max(9., 10.))
assert.Equal(t, 11., Max(11., 10.))
assert.Equal(t, 0, Max(-1, 0))
assert.Equal(t, 1, Max(1, 0))
}