Package rekit.util

Class CalcUtil

java.lang.Object
rekit.util.CalcUtil

public final class CalcUtil extends Object
This class contains several methods to calculate between units.
  • Method Details

    • units2pixel

      public static int units2pixel(float units)
      Units to Pixels.
      Parameters:
      units - the units
      Returns:
      the pixels
    • units2pixel

      public static Vec units2pixel(Vec pos)
      Units to Pixels.
      Parameters:
      pos - the position
      Returns:
      the position in units
    • randomize

      public static double randomize(double mu, double sigma)
      Randomize a value.
      Parameters:
      mu - the value
      sigma - the sigma
      Returns:
      the randomized value
    • randomize

      public static float randomize(float mu, float sigma)
      Randomize a value.
      Parameters:
      mu - the value
      sigma - the sigma
      Returns:
      the randomized value