feat: move func to calc package

This commit is contained in:
Ilia Denisov
2026-05-10 14:55:14 +02:00
parent 92413575f3
commit 408097e3aa
11 changed files with 21214 additions and 38 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"math"
"testing"
"galaxy/calc"
"galaxy/util"
"github.com/stretchr/testify/assert"
@@ -22,7 +23,7 @@ func TestShortDistance(t *testing.T) {
{10, 10, 8, 7, 1, 7, 3.},
} {
t.Run(fmt.Sprint(i), func(t *testing.T) {
d := util.ShortDistance(tc.w, tc.h, tc.x1, tc.y1, tc.x2, tc.y2)
d := calc.ShortDistance(tc.w, tc.h, tc.x1, tc.y1, tc.x2, tc.y2)
assert.Equal(t, tc.d, util.Fixed3(d))
})
}