Class Calculation

java.lang.Object
de.redstoneworld.redutilities.math.Calculation

public class Calculation extends Object
  • 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) value
      x - (float) rounding accuracy (e.g. "0.5")
      Returns:
      (float) the rounded value