forked from SteamWar/SteamWar
Hotfix xsome exceptions
This commit is contained in:
@@ -32,6 +32,13 @@ public class Gradient {
|
||||
}
|
||||
|
||||
public Color getColor(double value, double maxValue) {
|
||||
if (colors.isEmpty()) {
|
||||
return Color.BLACK;
|
||||
}
|
||||
if (colors.size() == 1) {
|
||||
return colors.get(0);
|
||||
}
|
||||
|
||||
value /= maxValue / (double) (colors.size() - 1);
|
||||
|
||||
return lerpColor(
|
||||
|
||||
Reference in New Issue
Block a user