Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -151,6 +151,10 @@ public class PointF {
|
||||
return (float)Math.atan2( end.y - start.y, end.x - start.x );
|
||||
}
|
||||
|
||||
public static float angle( Point start, Point end ) {
|
||||
return (float)Math.atan2( end.y - start.y, end.x - start.x );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (super.equals(o))
|
||||
|
||||
@@ -256,7 +256,18 @@ public class Random {
|
||||
public synchronized static<T> void shuffle( List<?extends T> list){
|
||||
Collections.shuffle(list, generators.peek());
|
||||
}
|
||||
|
||||
|
||||
public static void shuffle( int[] array ) {
|
||||
for (int i=0; i < array.length - 1; i++) {
|
||||
int j = Int( i, array.length );
|
||||
if (j != i) {
|
||||
int t = array[i];
|
||||
array[i] = array[j];
|
||||
array[j] = t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static<T> void shuffle( T[] array ) {
|
||||
for (int i=0; i < array.length - 1; i++) {
|
||||
int j = Int( i, array.length );
|
||||
|
||||
Reference in New Issue
Block a user