/** Updates the x coordinates in the active edges list and sorts the list if necessary. */ void updateXCoordinates() { int index; double x1=-Double.MAX_VALUE, x2; boolean sorted = true; for (int i=0; i<activeEdges; i++) { index = aedge[i]; x2 = ex[index] + eslope[index]; ex[index] = x2; if (x2<x1) sorted = false; x1 = x2; } if (!sorted) sortActiveEdges(); }
/** Updates the x coordinates in the active edges list and sorts the list if necessary. */ void updateXCoordinates() { int index; double x1=-Double.MAX_VALUE, x2; boolean sorted = true; for (int i=0; i<activeEdges; i++) { index = aedge[i]; x2 = ex[index] + eslope[index]; ex[index] = x2; if (x2<x1) sorted = false; x1 = x2; } if (!sorted) sortActiveEdges(); }