From ecf34d876f2c0cf85faaaa5727bef44d3f5fff1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F?= Date: Sat, 2 Nov 2024 09:57:56 +0300 Subject: [PATCH] refactor --- go.mod | 4 +--- go.sum | 2 ++ test/space_test.go | 29 ----------------------------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 43bec9b..261ba05 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,4 @@ go 1.23.2 retract [v1.0.0, v1.12.0] -require ( - github.com/setanarut/vec v1.1.1 -) +require github.com/setanarut/vec v1.1.1 diff --git a/go.sum b/go.sum index 5166edf..43d5f33 100644 --- a/go.sum +++ b/go.sum @@ -2,3 +2,5 @@ github.com/jakecoffman/cp/v2 v2.1.0 h1:s0almZ7zDZs9JY35ciUgCoVKTMmdPkokF1dxHg226 github.com/jakecoffman/cp/v2 v2.1.0/go.mod h1:Q0hFU7Kk6PMw4dwgFtvBC6O4KTm7ewiLuHrXtHMicyU= github.com/setanarut/vec v1.1.0 h1:Tmei65+2EsQzNB+0xkpNgcXGTZTT0gEUdZRjVb2CuuQ= github.com/setanarut/vec v1.1.0/go.mod h1:ZDoKd7F60rWLgCK58novWOCe5ePiXfSkwtmuOSSC9TU= +github.com/setanarut/vec v1.1.1 h1:2nH1gbDMCa/IHTdG41nmI+2OYyKhbiputK+Bg/mMK+s= +github.com/setanarut/vec v1.1.1/go.mod h1:ZDoKd7F60rWLgCK58novWOCe5ePiXfSkwtmuOSSC9TU= diff --git a/test/space_test.go b/test/space_test.go index f43477c..1dd867f 100644 --- a/test/space_test.go +++ b/test/space_test.go @@ -45,24 +45,6 @@ func TestSpaceAddBody(t *testing.T) { } } -// func TestSpace_ReindexShape(t *testing.T) { -// space := cm.NewSpace() -// circle := space.AddShape(cm.NewCircle(space.StaticBody, 1, vec.Vec2{})) -// bb1 := circle.BB -// space.ReindexShape(circle) -// bb2 := circle.BB -// // check unchanged -// if got, want := bb1.String(), bb2.String(); got != want { -// t.Errorf("got [%[1]v:%[1]T] want [%[2]v:%[2]T]", got, want) -// } -// circle.Body().SetPosition(vec.Vec2{X: 12.0, Y: 34.0}) -// space.ReindexShape(circle) -// bb3 := circle.BB -// // check changed -// if got, want := bb2.String(), bb3.String(); got == want { -// t.Errorf("got [%[1]v:%[1]T] want [%[2]v:%[2]T]", got, want) -// } -// } func TestSpace_ReindexShape(t *testing.T) { space := cm.NewSpace() sb := cm.NewStaticBody() @@ -84,14 +66,3 @@ func TestSpace_ReindexShape(t *testing.T) { t.Errorf("got [%[1]v:%[1]T] want [%[2]v:%[2]T]", got, want) } } - -// func TestSpace_RemoveBodyWithShapes(t *testing.T) { -// space := cm.NewSpace() -// radius := 5.0 - -// body := cm.NewBody(1, cm.MomentForCircle2(1, radius)) -// shapeA := cm.NewCircle2(body, radius) -// shapeB := cm.NewCircle2(body, radius) - -// space.AddBodyWithShapes() -// }