Joise, Kotlin (it's working at least)

Former-commit-id: d5be0e95ba259d566d6d5d20eb576010a149ae7d
Former-commit-id: 9502c7cd7e738147e31d2e9824e48bea24d00abf
This commit is contained in:
Song Minjae
2016-03-14 22:43:28 +09:00
parent 46a553d258
commit 3f49a8aebe
342 changed files with 17386 additions and 360 deletions

View File

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