mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-07 02:26:43 +01:00
Run IntelliJ IDEA code formatter
This commit is contained in:
@@ -21,18 +21,19 @@ public class SceneRegion {
|
||||
public List<Position> point_array;
|
||||
|
||||
public transient SceneGroup group;
|
||||
|
||||
public boolean contains(Position position) {
|
||||
switch (shape) {
|
||||
case ScriptRegionShape.CUBIC:
|
||||
return (Math.abs(pos.getX() - position.getX()) <= size.getX()) &&
|
||||
(Math.abs(pos.getY() - position.getY()) <= size.getY()) &&
|
||||
(Math.abs(pos.getZ() - position.getZ()) <= size.getZ());
|
||||
(Math.abs(pos.getY() - position.getY()) <= size.getY()) &&
|
||||
(Math.abs(pos.getZ() - position.getZ()) <= size.getZ());
|
||||
case ScriptRegionShape.SPHERE:
|
||||
var x = Math.pow(pos.getX() - position.getX(), 2);
|
||||
var y = Math.pow(pos.getY() - position.getY(), 2);
|
||||
var z = Math.pow(pos.getZ() - position.getZ(), 2);
|
||||
// ^ means XOR in java!
|
||||
return x + y + z <= (radius*radius);
|
||||
return x + y + z <= (radius * radius);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user