public static StringBuilder formatTo(StringBuilder buf,double[][] d,String pre,String pos,String csep,NumberFormat nf){
  if (d == null) {
    return buf.append("null");
  }
  if (d.length == 0) {
    return buf;
  }
  for (int i=0; i < d.length; i++) {
    buf.append(pre);
    formatTo(buf,d[i],csep,nf);
    buf.append(pos);
  }
  return buf;
}

public static StringBuilder formatTo ( StringBuilder buf , double [ ] [ ] d , String pre , String pos , String csep , NumberFormat nf ) { if ( d == null ) { return buf . append ( "null" ) ; } if ( d . length == 0 ) { return buf ; } for ( int i = 0 ; i < d . length ; i ++ ) { buf . append ( pre ) ; formatTo ( buf , d [ i ] , csep , nf ) ; buf . append ( pos ) ; } return buf ; }
formats the array of double arrays d with the specified separators and fraction digits .
