diff --git a/README.md b/README.md index d8f4ae1..136ed1b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,4 @@ Geometric separators project for CSE 4095 (Computational Geometry). About: ------ -This Java program will allow you to input 2D - - +This Java program will allow you to input 2D \ No newline at end of file diff --git a/code/commons-math3-3.3.jar b/code/commons-math3-3.3.jar new file mode 100644 index 0000000..25102f2 Binary files /dev/null and b/code/commons-math3-3.3.jar differ diff --git a/geometric_separators.pde b/geometric_separators.pde index 7316fa6..d5b026f 100644 --- a/geometric_separators.pde +++ b/geometric_separators.pde @@ -57,8 +57,12 @@ void mousePressed() { // If mouse presses calculate button else if ((mouseX >= calc_x && mouseX <= (calc_x + calc_w)) && (mouseY >= calc_y && mouseY <= (calc_y + calc_h))) { - if (rawInput.size() == 0) { - System.out.println("You don't have any input points!"); + if (rawInput.size() < 5) { + System.out.println("You need at least 5 points!"); + return; + } + else if ((Math.log((double)rawInput.size()) / Math.log(5)) % 1 != 0) { + System.out.println("You don't have a power of 5!"); return; } CenterAndSphere returnVals = getSeparator(rawInput);