Class Calculations

java.lang.Object
org.highlife.api.methods.Calculations

public class Calculations extends Object
  • Constructor Details

    • Calculations

      public Calculations()
  • Method Details

    • random

      public static int random(int high)
    • random

      public static int random(int min, int max)
    • nextLogNormalDistributionRandom

      public static double nextLogNormalDistributionRandom(double scale, double shape) throws org.apache.commons.math3.exception.NotStrictlyPositiveException
      Throws:
      org.apache.commons.math3.exception.NotStrictlyPositiveException
    • random

      public static double random(double lower, double upper)
    • random

      public static long random(long min, long max)
    • nextGaussianRandom

      public static double nextGaussianRandom(double mean, double sigma)
    • nextHypergeometricRandom

      public static double nextHypergeometricRandom(int populationSize, int numberOfSuccesses, int sampleSize)
    • nextGammaRandom

      public static double nextGammaRandom(int shape, int scale)
    • setRandomSeed

      public static void setRandomSeed(long seed)
    • distance

      public static double distance(Tile t1, Tile t2)
    • distance

      public static double distance(Point p1, Point p2)
    • distance

      public static double distance(int x1, int y1, int x2, int y2)
    • getRandom

      public static Random getRandom()
    • isBefore

      public static boolean isBefore(long futureTime)
    • elapsed

      public static long elapsed(long prevTime)
    • generateRandomString

      public static String generateRandomString()
    • chance

      public static boolean chance(int target, int overall)
    • chance

      public static boolean chance(int target)