diff options
Diffstat (limited to 'src/main/java/tectech/util')
-rw-r--r-- | src/main/java/tectech/util/GodforgeMath.java | 9 | ||||
-rw-r--r-- | src/main/java/tectech/util/TTUtility.java | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/tectech/util/GodforgeMath.java b/src/main/java/tectech/util/GodforgeMath.java index a3105e08a1..1a0fa96805 100644 --- a/src/main/java/tectech/util/GodforgeMath.java +++ b/src/main/java/tectech/util/GodforgeMath.java @@ -21,12 +21,11 @@ public class GodforgeMath { upgradeFactor = 0.8; } if (godforge.getFuelType() == 0) { - return Math - .max(godforge.getFuelFactor() * 300 * Math.pow(1.15, godforge.getFuelFactor()) * upgradeFactor, 1); + return godforge.getFuelFactor() * 300 * Math.pow(1.15, godforge.getFuelFactor()) * upgradeFactor; } if (godforge.getFuelType() == 1) { - return Math.max(godforge.getFuelFactor() * 2 * Math.pow(1.08, godforge.getFuelFactor()) * upgradeFactor, 1); - } else return Math.max(godforge.getFuelFactor() / 25 * upgradeFactor, 1); + return godforge.getFuelFactor() * 2 * Math.pow(1.08, godforge.getFuelFactor()) * upgradeFactor; + } else return godforge.getFuelFactor() / 25f * upgradeFactor; } public static int calculateStartupFuelConsumption(MTEForgeOfGods godforge) { @@ -293,6 +292,6 @@ public class GodforgeMath { module.setPowerTally(BigInteger.ZERO); godforge.addTotalRecipesProcessed(module.getRecipeTally()); module.setRecipeTally(0); - + module.setInversionConfig(godforge.isInversionAvailable()); } } diff --git a/src/main/java/tectech/util/TTUtility.java b/src/main/java/tectech/util/TTUtility.java index f552fde984..d8f60a4c37 100644 --- a/src/main/java/tectech/util/TTUtility.java +++ b/src/main/java/tectech/util/TTUtility.java @@ -40,7 +40,14 @@ public final class TTUtility { String strNum = abs.toString(); int exponent = strNum.length() - 1; return (number.signum() == -1 ? "-" : "") + strNum.charAt(0) + "." + strNum.substring(1, 3) + "e" + exponent; + } + public static String toExponentForm(long number) { + long abs = Math.abs(number); + String strNum = Long.toString(abs); + int exponent = strNum.length() - 1; + return (Long.signum(number) == -1 ? "-" : "") + strNum + .charAt(0) + "." + strNum.substring(1, 3) + "e" + exponent; } public static int bitStringToInt(String bits) { |