question: private void calculateWindowProportions ( final int slots ) { int width = ( int ) Math . sqrt ( slots ) ; while ( slots % width != 0 ) { width -- ; if ( width <= 0 ) { logger . error ( "Failed to decide dimensions for slot window. slots = " + slots ) ; width = 1 ; } } slotWindowWidth = width ; slotWindowHeight = slots / width ; }
target:  Find out dimensions for a somewhat square slot window.