Skip to content

Commit 5951ea8

Browse files
committed
chore: lint unit tests
1 parent 61d5e66 commit 5951ea8

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

epa/manifold_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ func vec3Equal(a, b mgl64.Vec3, tolerance float64) bool {
1616
math.Abs(a.Z()-b.Z()) < tolerance
1717
}
1818

19-
func containsPoint(points []mgl64.Vec3, target mgl64.Vec3, tolerance float64) bool {
20-
for _, p := range points {
21-
if vec3Equal(p, target, tolerance) {
22-
return true
23-
}
24-
}
25-
return false
26-
}
27-
2819
// TestComputeCenter tests the centroid calculation
2920
func TestComputeCenter(t *testing.T) {
3021
tests := []struct {

gjk/gjk_test.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -421,29 +421,20 @@ func TestGJK_DegenerateSimplex(t *testing.T) {
421421

422422
func TestGJK_TetrahedronFaceNormal(t *testing.T) {
423423
t.Run("origin nearly on face (distance < 1e-12)", func(t *testing.T) {
424-
// Create a tetrahedron where origin is extremely close to face ABC but still outside
425-
simplex := Simplex{
426-
{0, 0, 0}, // D
427-
{1, 0, 0}, // C
428-
{0, 1, 0}, // B
429-
{0, 0, 1}, // A
430-
}
431-
direction := mgl64.Vec3{0, 0, 1}
432-
433424
// Move origin extremely close to the face (ABC) but outside
434425
// The face ABC is the triangle with points A, B, C
435426
// The normal should point away from D (0,0,0)
436427
// Origin is at (0,0,0) which is point D, so we need to move the tetrahedron
437428
// so origin is near face ABC but not inside
438429

439430
// Create a tetrahedron with face ABC at z=1e-12 and origin at (0,0,0)
440-
simplex = Simplex{
431+
simplex := Simplex{
441432
{1, 1, -1e-12}, // D
442433
{1, 0, 1e-12}, // C
443434
{0, 1, 1e-12}, // B
444435
{0, 0, 1e-12}, // A
445436
}
446-
direction = mgl64.Vec3{0, 0, 1}
437+
direction := mgl64.Vec3{0, 0, 1}
447438

448439
result := tetrahedron(&simplex, &direction)
449440
if result {

0 commit comments

Comments
 (0)