assets/scripts/jsplumb/2.0/jsplumb.js
function(w, degree, t, depth) {
		var left = [], right = [],
			left_count, right_count,
			left_t = [], right_t = [];

		switch (_getCrossingCount(w, degree)) {
			case 0 : {
				return 0;
			}
			case 1 : {
				if (depth >= maxRecursion) {
					t[0] = (w[0].x + w[degree].x) / 2.0;
					return 1;
				}
				if (_isFlatEnough(w, degree)) {
					t[0] = _computeXIntercept(w, degree);
					return 1;
				}
				break;
			}
		}
		_bezier(w, degree, 0.5, left, right);
		left_count  = _findRoots(left,  degree, left_t, depth+1);
		right_count = _findRoots(right, degree, right_t, depth+1);
		for (var i = 0; i < left_count; i++) t[i] = left_t[i];
		for (var i = 0; i < right_count; i++) t[i+left_count] = right_t[i];
		return (left_count+right_count);
	}
function(w, degree, t, depth) {
		var left = [], right = [],
			left_count, right_count,
			left_t = [], right_t = [];

		switch (_getCrossingCount(w, degree)) {
			case 0 : {
				return 0;
			}
			case 1 : {
				if (depth >= maxRecursion) {
					t[0] = (w[0].x + w[degree].x) / 2.0;
					return 1;
				}
				if (_isFlatEnough(w, degree)) {
					t[0] = _computeXIntercept(w, degree);
					return 1;
				}
				break;
			}
		}
		_bezier(w, degree, 0.5, left, right);
		left_count  = _findRoots(left,  degree, left_t, depth+1);
		right_count = _findRoots(right, degree, right_t, depth+1);
		for (var i = 0; i < left_count; i++) t[i] = left_t[i];
		for (var i = 0; i < right_count; i++) t[i+left_count] = right_t[i];
		return (left_count+right_count);
	}
function ( w , degree , t , depth ) { var left = [ ] , right = [ ] , left_count , right_count , left_t = [ ] , right_t = [ ] ; switch ( _getCrossingCount ( w , degree ) ) { case 0 : { return 0 ; } case 1 : { if ( depth >= maxRecursion ) { t [ 0 ] = ( w [ 0 ] . x + w [ degree ] . x ) / 2.0 ; return 1 ; } if ( _isFlatEnough ( w , degree ) ) { t [ 0 ] = _computeXIntercept ( w , degree ) ; return 1 ; } break ; } } _bezier ( w , degree , 0.5 , left , right ) ; left_count = _findRoots ( left , degree , left_t , depth + 1 ) ; right_count = _findRoots ( right , degree , right_t , depth + 1 ) ; for ( var i = 0 ; i < left_count ; i ++ ) t [ i ] = left_t [ i ] ; for ( var i = 0 ; i < right_count ; i ++ ) t [ i + left_count ] = right_t [ i ] ; return ( left_count + right_count ) ; }
counts how many roots there are.
counts how many roots there are .