Kaynağa Gözat

- use Float.isInfinite in ShadowUtil

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8827 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 yıl önce
ebeveyn
işleme
e1bcefefe9

+ 1 - 1
engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java

@@ -197,7 +197,7 @@ public class ShadowUtil {
             BoundingVolume vol = list.get(i).getWorldBound();
             store = vol.clone().transform(mat, null);
             //Nehon : prevent NaN and infinity values to screw the final bounding box
-            if (!Float.isNaN(store.getCenter().x) && store.getCenter().x != Float.POSITIVE_INFINITY && store.getCenter().x != Float.NEGATIVE_INFINITY) {
+            if (!Float.isNaN(store.getCenter().x) && !Float.isInfinite(store.getCenter().x)) {
                 bbox.mergeLocal(store);
             }
         }