Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-02-07 18:38:38 +02:00
74 changed files with 966 additions and 210 deletions

View File

@@ -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))

View File

@@ -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 );