Class MathUtils

java.lang.Object
com.toxicrain.rainengine.util.MathUtils

public class MathUtils extends Object
  • Constructor Details

    • MathUtils

      public MathUtils()
  • Method Details

    • getRandomIntBetween

      public static int getRandomIntBetween(int min, int max)
    • getRandomFloatBetween

      public static float getRandomFloatBetween(float min, float max)
    • clamp

      public static float clamp(float value, int min, int max)
    • calculateAngle

      public static float calculateAngle(double x, double y)
      Calculates the angle in degrees between the positive x-axis and the point (x, y).
      Parameters:
      x - The x-coordinate.
      y - The y-coordinate.
      Returns:
      The angle in degrees.
    • approximatelyEqual

      public static boolean approximatelyEqual(float a, float b, float epsilon)