Calculates the rounding of a matrix.