topology.js
function unique(cells) {
  if(cells.length === 0) {
    return []
  }
  var ptr = 1
    , len = cells.length
  for(var i=1; i<len; ++i) {
    var a = cells[i]
    if(compareCells(a, cells[i-1])) {
      if(i === ptr) {
        ptr++
        continue
      }
      cells[ptr++] = a
    }
  }
  cells.length = ptr
  return cells
}
function unique(cells) {
  if(cells.length === 0) {
    return []
  }
  var ptr = 1
    , len = cells.length
  for(var i=1; i<len; ++i) {
    var a = cells[i]
    if(compareCells(a, cells[i-1])) {
      if(i === ptr) {
        ptr++
        continue
      }
      cells[ptr++] = a
    }
  }
  cells.length = ptr
  return cells
}
function unique ( cells ) { if ( cells . length === 0 ) { return [ ] } var ptr = 1 , len = cells . length for ( var i = 1 ; i < len ; ++ i ) { var a = cells [ i ] if ( compareCells ( a , cells [ i - 1 ] ) ) { if ( i === ptr ) { ptr ++ continue } cells [ ptr ++ ] = a } } cells . length = ptr return cells }
Removes all duplicate cells in the complex
Removes all duplicate cells in the complex