From 7845c545700fb124c851dfe2042fa88efc5cc68a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 03:07:29 +0000 Subject: [PATCH] Format code [skip actions] --- .../java/emu/grasscutter/scripts/data/SceneRegion.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/emu/grasscutter/scripts/data/SceneRegion.java b/src/main/java/emu/grasscutter/scripts/data/SceneRegion.java index 99db23615..ea4b2ece3 100644 --- a/src/main/java/emu/grasscutter/scripts/data/SceneRegion.java +++ b/src/main/java/emu/grasscutter/scripts/data/SceneRegion.java @@ -38,8 +38,8 @@ public class SceneRegion { return x * x + y * y + z * z <= radius * radius; } case ScriptRegionShape.CUBIC -> { - return (Math.abs(pos.getX() - position.getX()) <= size.getX() / 2f) - && (Math.abs(pos.getY() - position.getY()) <= size.getY() / 2f) + return (Math.abs(pos.getX() - position.getX()) <= size.getX() / 2f) + && (Math.abs(pos.getY() - position.getY()) <= size.getY() / 2f) && (Math.abs(pos.getZ() - position.getZ()) <= size.getZ() / 2f); } case ScriptRegionShape.POLYGON -> { @@ -57,8 +57,7 @@ public class SceneRegion { val x1 = point_array.get(i).getX(); val x2 = point_array.get(j).getX(); - if ((yp < y1) != (yp < y2) - && xp < x1 + ((yp - y1) / (y2 - y1)) * (x2 - x1)) { + if ((yp < y1) != (yp < y2) && xp < x1 + ((yp - y1) / (y2 - y1)) * (x2 - x1)) { ++count; } }