topology.js
function dimension(cells) {
  var d = 0
    , max = Math.max
  for(var i=0, il=cells.length; i<il; ++i) {
    d = max(d, cells[i].length)
  }
  return d-1
}
function dimension(cells) {
  var d = 0
    , max = Math.max
  for(var i=0, il=cells.length; i<il; ++i) {
    d = max(d, cells[i].length)
  }
  return d-1
}
function dimension ( cells ) { var d = 0 , max = Math . max for ( var i = 0 , il = cells . length ; i < il ; ++ i ) { d = max ( d , cells [ i ] . length ) } return d - 1 }
Returns the dimension of a cell complex
Returns the dimension of a cell complex