Fixed #3834 / Fixed #3835 / Fixed #3837

This commit is contained in:
Anuken
2020-12-07 11:10:19 -05:00
parent 5e0ba2f4af
commit 557cb1c532
6 changed files with 25 additions and 4 deletions

View File

@@ -82,6 +82,10 @@ public class Bar extends Element{
lastValue = computed;
}
if(Float.isNaN(lastValue)) lastValue = 0;
if(Float.isInfinite(lastValue)) lastValue = 1f;
if(Float.isNaN(value)) value = 0;
if(Float.isInfinite(value)) value = 1f;
if(Float.isNaN(computed)) computed = 0;
if(Float.isInfinite(computed)) computed = 1f;