Class Calculation
java.lang.Object
de.redstoneworld.redutilities.math.Calculation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longgetMillisFromServerTicks(long serverTicks) static longgetServerTicksFromMillis(long millis) static floatroundToX(double input, float x) This method rounds up the input to the desired accuracy.
-
Constructor Details
-
Calculation
public Calculation()
-
-
Method Details
-
getMillisFromServerTicks
public static long getMillisFromServerTicks(long serverTicks) -
getServerTicksFromMillis
public static long getServerTicksFromMillis(long millis) -
roundToX
public static float roundToX(double input, float x) This method rounds up the input to the desired accuracy. The normal round function of Math always rounds up or down to "1".- Parameters:
input- (double) valuex- (float) rounding accuracy (e.g. "0.5")- Returns:
- (float) the rounded value
-