aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-05 17:08:38 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-05 17:08:38 +1000
commit85f53faa9201e468c58d3bf124f4c4dfbc36c2b7 (patch)
treeda9fba21edf4ddd8af88f99a18f7ae80c8499b0f /src/Java/gtPlusPlus/core/util
parent8aa1b1fdcdc906f607624c05f43367e9b5d23620 (diff)
downloadGT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.tar.gz
GT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.tar.bz2
GT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.zip
+ Added Custom RTG.
+ Added RTG fuel use recipes for RTG Pellets.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/math/MathUtils.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
index a46bd8c61d..b61af67566 100644
--- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
@@ -197,6 +197,20 @@ public class MathUtils {
}
return result;
}
+
+
+ //Smooth Rounding Function
+ /**
+ * Returns a long.
+ * The returned number is d rounded to the nearest flat long.
+ * Supports Doubles as input.
+ *
+ * @param current Current value.
+ * @return long Rounded value.
+ */
+ public static long roundToClosestLong(final double d) {
+ return (long) (Math.round(d * 2) / 2.0);
+ }
/**