* Throw exception if the spot light computed cosine angle is not valid
This commit is contained in:
parent
7cdc473e14
commit
76147fc5f7
@ -77,6 +77,10 @@ public class SpotLight extends Light implements Savable {
|
|||||||
outerCos -= 0.001f;
|
outerCos -= 0.001f;
|
||||||
}
|
}
|
||||||
packedAngleCos += outerCos;
|
packedAngleCos += outerCos;
|
||||||
|
|
||||||
|
if (packedAngleCos == 0.0f) {
|
||||||
|
throw new IllegalArgumentException("Packed angle cosine is invalid");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user