Skip to content

Commit

Permalink
Format code [skip actions]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 9, 2023
1 parent 818b638 commit 7845c54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/emu/grasscutter/scripts/data/SceneRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public boolean contains(Position position) {
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 -> {
Expand All @@ -57,8 +57,7 @@ public boolean contains(Position position) {
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;
}
}
Expand Down

0 comments on commit 7845c54

Please sign in to comment.