From 3b1ab6922309729104e01314577f1dae7712b0c0 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 27 Nov 2011 16:00:30 +0000 Subject: [PATCH] - use Float.isInfinite in ShadowUtil git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8826 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java b/engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java index 52512c3df..3a1cdd865 100644 --- a/engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java +++ b/engine/src/desktop-fx/com/jme3/shadow/ShadowUtil.java @@ -177,7 +177,7 @@ public class ShadowUtil { BoundingVolume vol = list.get(i).getWorldBound(); BoundingVolume newVol = vol.transform(transform); //Nehon : prevent NaN and infinity values to screw the final bounding box - if (!Float.isNaN(newVol.getCenter().x) && newVol.getCenter().x != Float.POSITIVE_INFINITY && newVol.getCenter().x != Float.NEGATIVE_INFINITY) { + if (!Float.isNaN(newVol.getCenter().x) && !Float.isInfinite(newVol.getCenter().x)) { bbox.mergeLocal(newVol); } }