Baluster Spacing Calculator
Baluster spacing is a whole number problem: only a whole number of balusters fits an opening, so the gap that results is never exactly the limit you aimed at. Enter the clear opening between two posts, the baluster width and the largest gap you are allowed, and this returns the count, the gap that actually comes out, the on centre spacing and a list of marks for the rail. A second mode takes a whole run, splits it into equal sections between posts, and fills each one. It handles both end conditions, a gap against each post or a baluster tight against it, which is where the count changes by one.