mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 04:41:51 +09:00
Joise, Kotlin (it's working at least)
Former-commit-id: d5be0e95ba259d566d6d5d20eb576010a149ae7d Former-commit-id: 9502c7cd7e738147e31d2e9824e48bea24d00abf
This commit is contained in:
@@ -840,14 +840,14 @@ final public class FastMath {
|
||||
}
|
||||
|
||||
public static float min(float... f) {
|
||||
float[] sorted = f.clone();
|
||||
Arrays.sort(f.clone());
|
||||
return sorted[0];
|
||||
float min = f[0];
|
||||
for (int i = 1; i < f.length; i++) min = (f[i] < min) ? f[i] : min;
|
||||
return min;
|
||||
}
|
||||
|
||||
public static float max(float... f) {
|
||||
float[] sorted = f.clone();
|
||||
Arrays.sort(f.clone());
|
||||
return sorted[sorted.length - 1];
|
||||
float max = f[0];
|
||||
for (int i = 1; i < f.length; i++) max = (f[i] > max) ? f[i] : max;
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user