argument validation

This commit is contained in:
rusefillc 2025-03-22 16:55:08 -04:00
parent 9ee85419e7
commit 4497f054e5
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,8 @@ public class PinLine {
private static final int Y_FROM = 215;
public static void main(String[] args) {
if (INDEX_FROM > INDEX_TO)
throw new IllegalStateException("Indexing order " + INDEX_FROM + " to " + INDEX_TO);
int count = INDEX_TO - INDEX_FROM;
float width = X_TO - X_FROM;