Methodology
Balanced border geometry & grid-layout boundary
Remainder
room dimension mod tile module
The amount left after whole tile modules are removed.
Balanced border
(remainder + one tile module) ÷ 2
Creates equal opposite borders and borrows one full module into the two borders.
Full interior modules
floor(room ÷ module) − 1
Whole modules remaining between the two border panels; never less than zero.
First grid line
balanced border from datum wall
Repeat the selected tile module from this line across the field.