Skip to content

Commit

Permalink
contourshape
Browse files Browse the repository at this point in the history
  • Loading branch information
Alextopher committed Nov 4, 2024
1 parent 3447c3e commit 5e96602
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@ public enum ContourShape {
}

public static ContourShape fromSides(int sides) {
switch (sides) {
case 0:
return Circle;
case 3:
return Triangle;
case 4:
return Quadrilateral;
default:
return Custom;
}
return switch (sides) {
case 0 -> Circle;
case 3 -> Triangle;
case 4 -> Quadrilateral;
default -> Custom;
};
}
}

0 comments on commit 5e96602

Please sign in to comment.