js/components/matrix.js
function() {
        var wrapperWidth = this.element.outerWidth(),
            colWidth = this.options.width,
            gutter = this.options.gutter,
            cols = Math.max(Math.floor(wrapperWidth / colWidth), 1),
            colsWidth = (cols * (colWidth + gutter)) - gutter,
            diff;

        if (cols > 1) {
            if (colsWidth > wrapperWidth) {
                diff = colsWidth - wrapperWidth;
                colWidth -= (diff / cols);

            } else if (colsWidth < wrapperWidth) {
                diff = wrapperWidth - colsWidth;
                colWidth += (diff / cols);
            }
        }

        this.wrapperWidth = wrapperWidth;
        this.colWidth = colWidth;
        this.colCount = cols;
    }
function() {
        var wrapperWidth = this.element.outerWidth(),
            colWidth = this.options.width,
            gutter = this.options.gutter,
            cols = Math.max(Math.floor(wrapperWidth / colWidth), 1),
            colsWidth = (cols * (colWidth + gutter)) - gutter,
            diff;

        if (cols > 1) {
            if (colsWidth > wrapperWidth) {
                diff = colsWidth - wrapperWidth;
                colWidth -= (diff / cols);

            } else if (colsWidth < wrapperWidth) {
                diff = wrapperWidth - colsWidth;
                colWidth += (diff / cols);
            }
        }

        this.wrapperWidth = wrapperWidth;
        this.colWidth = colWidth;
        this.colCount = cols;
    }
function ( ) { var wrapperWidth = this . element . outerWidth ( ) , colWidth = this . options . width , gutter = this . options . gutter , cols = Math . max ( Math . floor ( wrapperWidth / colWidth ) , 1 ) , colsWidth = ( cols * ( colWidth + gutter ) ) - gutter , diff ; if ( cols > 1 ) { if ( colsWidth > wrapperWidth ) { diff = colsWidth - wrapperWidth ; colWidth -= ( diff / cols ) ; } else if ( colsWidth < wrapperWidth ) { diff = wrapperWidth - colsWidth ; colWidth += ( diff / cols ) ; } } this . wrapperWidth = wrapperWidth ; this . colWidth = colWidth ; this . colCount = cols ; }
Calculate how many columns can be supported in the current resolution.
Modify the column width to account for gaps on either side.

@private
Calculate how many columns can be supported in the current resolution . Modify the column width to account for gaps on either side .