MCPcopy Index your code
hub / github.com/benfry/processing4 / sortReverse

Method sortReverse

core/src/processing/data/LongList.java:598–618  ·  view source on GitHub ↗

Reverse sort, orders values from highest to lowest. @webref intlist:method @webBrief Reverse sort, orders values from highest to lowest

()

Source from the content-addressed store, hash-verified

596 * @webBrief Reverse sort, orders values from highest to lowest
597 */
598 public void sortReverse() {
599 new Sort() {
600 @Override
601 public int size() {
602 return count;
603 }
604
605 @Override
606 public int compare(int a, int b) {
607 long diff = data[b] - data[a];
608 return diff == 0 ? 0 : (diff < 0 ? -1 : 1);
609 }
610
611 @Override
612 public void swap(int a, int b) {
613 long temp = data[a];
614 data[a] = data[b];
615 data[b] = temp;
616 }
617 }.run();
618 }
619
620
621 /**

Callers

nothing calls this directly

Calls 1

runMethod · 0.65

Tested by

no test coverage detected