- clampTo's doc justified itself by stopping hexCenters "looping forever", which stopped being true when hexCenters became count-bounded. Say what it actually does now, and note the inversion the new guard relies on. - Trim the changelog prose from hexCenters' doc down to the one line that earns its keep: don't re-anchor at the min corner, and why. - Rename a test local from `max` so it stops shadowing the builtin. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01H3zbym8Doka2d7D48maSgZ
This commit is contained in:
@@ -103,14 +103,14 @@ func TestHexCentersEdgeInset(t *testing.T) {
|
||||
|
||||
// A clump may cross the edge, but only by the half-spacing the rule
|
||||
// allows — never enough to be mostly out in the path.
|
||||
max := tc.spacing / 2
|
||||
budget := tc.spacing / 2
|
||||
for _, p := range pts {
|
||||
over := math.Max(
|
||||
math.Max(r.MinX-(p.x-tc.radius), (p.x+tc.radius)-r.MaxX),
|
||||
math.Max(r.MinY-(p.y-tc.radius), (p.y+tc.radius)-r.MaxY),
|
||||
)
|
||||
if over > max+1e-6 {
|
||||
t.Errorf("plop at (%.1f,%.1f) overhangs by %.2f, max %.2f", p.x, p.y, over, max)
|
||||
if over > budget+1e-6 {
|
||||
t.Errorf("plop at (%.1f,%.1f) overhangs by %.2f, budget %.2f", p.x, p.y, over, budget)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user