Skip to content
Snippets Groups Projects
Commit 8a88a6c5 authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Negative radius check implemented

parent f37c1880
No related branches found
No related tags found
No related merge requests found
...@@ -41,13 +41,16 @@ public class PrioritySphere extends MeshVisitor { ...@@ -41,13 +41,16 @@ public class PrioritySphere extends MeshVisitor {
* *
* @param sphereCenterPosition Position of the center of the sphere in which * @param sphereCenterPosition Position of the center of the sphere in which
* the priorities will be calculated * 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) { public PrioritySphere(Point3d sphereCenterPosition, double sphereRadius) {
if (sphereCenterPosition == null) { if (sphereCenterPosition == null) {
throw new IllegalArgumentException("sphereCenterPosition"); throw new IllegalArgumentException("sphereCenterPosition");
} }
this.sphereCenterPosition = sphereCenterPosition; this.sphereCenterPosition = sphereCenterPosition;
if (sphereRadius < 0) {
throw new IllegalArgumentException("sphereRadius");
}
this.sphereRadius = sphereRadius; this.sphereRadius = sphereRadius;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment