Skip to content

Commit a63542b

Browse files
committed
compile time check
1 parent 3232655 commit a63542b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

model2d/hull_arcs_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ func TestArcHullSDF(t *testing.T) {
137137
circles[i] = circle
138138
}
139139

140-
arcHull := NewArcHull(circles)
140+
// Compile-time assertion that SDF is correctly implemented.
141+
type TotalSDF interface {
142+
PointSDF
143+
NormalSDF
144+
}
145+
146+
var arcHull TotalSDF = NewArcHull(circles)
141147
meshSDF := MeshToSDF(approximateArcHull(circles, pointsPerCircle))
142148

143149
for i := 0; i < samplesPerTrial; i++ {

0 commit comments

Comments
 (0)