|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.util.GlUtil
public class GlUtil
Various static methods of general utility.
| Constructor Summary | |
|---|---|
GlUtil()
|
|
| Method Summary | ||
|---|---|---|
static
|
divide(T[] a,
Comparator<? super T> comp)
Divides the provided array into two halves, so that the first half contains all of the elements less than the median, and the second half contains all of the elements equal to or greater than the median. |
|
static int |
nextPowerOfTwo(int value)
Returns the smallest power-of-two that is greater than or equal to the supplied (positive) value. |
|
protected static
|
partition(T[] a,
int left,
int right,
int pivotIndex,
Comparator<? super T> comp)
Partitions the [left, right] sub-array about the element at the supplied pivot index. |
|
protected static
|
swap(T[] a,
int idx1,
int idx2)
Swaps two elements in an array. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlUtil()
| Method Detail |
|---|
public static int nextPowerOfTwo(int value)
public static <T> void divide(T[] a,
Comparator<? super T> comp)
protected static <T> int partition(T[] a,
int left,
int right,
int pivotIndex,
Comparator<? super T> comp)
protected static <T> void swap(T[] a,
int idx1,
int idx2)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||