public void setSpotRange(float spotRange) {
        if (spotRange < 0) {
            throw new IllegalArgumentException("SpotLight range cannot be negative");
        }
        this.spotRange = spotRange;
        if (spotRange != 0f) {
            this.invSpotRange = 1f / spotRange;
        } else {
            this.invSpotRange = 0;
        }
    }
Set the range of the light influence.
<p>
Setting a non-zero range indicates the light should use attenuation.
If a pixel's distance to this light's position
is greater than the light's range, then the pixel will not be
affected by this light, if the distance is less than the range, then
the magnitude of the influence is equal to distance / range.

@param spotRange the range of the light influence.

@throws IllegalArgumentException If spotRange is negative
jme3-core/src/main/java/com/jme3/light/SpotLight.java