Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Make slope method slightly more readable in AngleMask
Dieser Commit ist enthalten in:
Ursprung
a40d1ccf51
Commit
3f28a5759d
@ -89,30 +89,38 @@ public class AngleMask extends AbstractExtentMask implements ResettableMask {
|
|||||||
if (slope >= min) {
|
if (slope >= min) {
|
||||||
return lastValue = true;
|
return lastValue = true;
|
||||||
}
|
}
|
||||||
slope = Math.max(slope, Math.abs(
|
slope = Math.max(
|
||||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
slope,
|
||||||
* ADJACENT_MOD);
|
Math.abs(getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance)) * ADJACENT_MOD
|
||||||
slope = Math.max(slope, Math.abs(
|
);
|
||||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
slope = Math.max(
|
||||||
x - distance, y, z - distance
|
slope,
|
||||||
)) * DIAGONAL_MOD);
|
Math.abs(
|
||||||
slope = Math.max(slope, Math.abs(
|
getHeight(extent, x + distance, y, z + distance) -
|
||||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
getHeight(extent, x - distance, y, z - distance)) * DIAGONAL_MOD
|
||||||
x + distance, y, z - distance
|
);
|
||||||
)) * DIAGONAL_MOD);
|
slope = Math.max(
|
||||||
|
slope,
|
||||||
|
Math.abs(
|
||||||
|
getHeight(extent, x - distance, y, z + distance) -
|
||||||
|
getHeight(extent, x + distance, y, z - distance)) * DIAGONAL_MOD
|
||||||
|
);
|
||||||
return lastValue = (slope >= min);
|
return lastValue = (slope >= min);
|
||||||
} else {
|
} else {
|
||||||
slope = Math.max(slope, Math.abs(
|
slope = Math.max(
|
||||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
slope,
|
||||||
* ADJACENT_MOD);
|
Math.abs(getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance)) * ADJACENT_MOD
|
||||||
slope = Math.max(slope, Math.abs(
|
);
|
||||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
slope = Math.max(
|
||||||
x - distance, y, z - distance
|
slope,
|
||||||
)) * DIAGONAL_MOD);
|
Math.abs(getHeight(extent, x + distance, y, z + distance) -
|
||||||
slope = Math.max(slope, Math.abs(
|
getHeight(extent, x - distance, y, z - distance)) * DIAGONAL_MOD
|
||||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
);
|
||||||
x + distance, y, z - distance
|
slope = Math.max(
|
||||||
)) * DIAGONAL_MOD);
|
slope,
|
||||||
|
Math.abs(getHeight(extent, x - distance, y, z + distance) -
|
||||||
|
getHeight(extent, x + distance, y, z - distance)) * DIAGONAL_MOD
|
||||||
|
);
|
||||||
return lastValue = (slope >= min && slope <= max);
|
return lastValue = (slope >= min && slope <= max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren