mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 17:26:07 +00:00
[AUTO] Cleanup code
This commit is contained in:
@@ -62,7 +62,7 @@ class DistributionTest {
|
||||
int end = normalMap.length - 1;
|
||||
while(start + 1 < end) {
|
||||
int mid = start + (end - start) / 2;
|
||||
if (normalMap[mid] <= d) {
|
||||
if(normalMap[mid] <= d) {
|
||||
start = mid;
|
||||
} else {
|
||||
end = mid;
|
||||
@@ -70,7 +70,7 @@ class DistributionTest {
|
||||
}
|
||||
double left = FastMath.abs(normalMap[start] - d);
|
||||
double right = FastMath.abs(normalMap[end] - d);
|
||||
if (left <= right) {
|
||||
if(left <= right) {
|
||||
return start * (num) / (normalMap.length);
|
||||
}
|
||||
return end * (num) / (normalMap.length);
|
||||
|
||||
@@ -95,7 +95,7 @@ class LookupGenerator {
|
||||
|
||||
public static int normalizeNew(double d) {
|
||||
for(int i = 0; i < lookup.length; i++) {
|
||||
if (d < lookup[i]) return i;
|
||||
if(d < lookup[i]) return i;
|
||||
}
|
||||
return lookup.length - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user