diff --git a/Comparison/src/main/java/cz/fidentis/analyst/visitors/mesh/PrioritySphere.java b/Comparison/src/main/java/cz/fidentis/analyst/visitors/mesh/PrioritySphere.java index 81d0cfa0c6df54fc543fe82a5a0fa349a8a2682c..31c3b647c80261ce3c453b14a8ec3e7e9622493c 100644 --- a/Comparison/src/main/java/cz/fidentis/analyst/visitors/mesh/PrioritySphere.java +++ b/Comparison/src/main/java/cz/fidentis/analyst/visitors/mesh/PrioritySphere.java @@ -41,13 +41,16 @@ public class PrioritySphere extends MeshVisitor { * * @param sphereCenterPosition Position of the center of the sphere in which * the priorities will be calculated - * @param sphereRadius Radius of the sphere + * @param sphereRadius Radius of the sphere (must be greater than or equal to 0) */ public PrioritySphere(Point3d sphereCenterPosition, double sphereRadius) { if (sphereCenterPosition == null) { throw new IllegalArgumentException("sphereCenterPosition"); } this.sphereCenterPosition = sphereCenterPosition; + if (sphereRadius < 0) { + throw new IllegalArgumentException("sphereRadius"); + } this.sphereRadius = sphereRadius; }