Class MathHelper

java.lang.Object
org.cloudburstmc.server.math.MathHelper

public class MathHelper extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    abs​(int number)
     
    static int
    ceil​(float floatNumber)
     
    static int
    clamp​(int check, int min, int max)
     
    static float
    cos​(double paramFloat)
     
    static float
    cos​(float paramFloat)
     
    static double
    denormalizeClamp​(double lowerBnd, double upperBnd, double slide)
     
    static float
    denormalizeClamp​(float lowerBnd, float upperBnd, float slide)
     
    static int
    floor​(double d0)
     
    static long
    floor_double_long​(double d)
     
    static int
    floor_float_int​(float f)
     
    static int
    getRandomNumberInRange​(Random random, int min, int max)
    Returns a random number between min and max, inclusive.
    static int
    log2​(int bits)
     
    static double
    max​(double first, double second, double third, double fourth)
     
    static float
    sin​(double paramFloat)
     
    static float
    sin​(float paramFloat)
     
    static float
    sqrt​(float paramFloat)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • sqrt

      public static float sqrt(float paramFloat)
    • sin

      public static float sin(float paramFloat)
    • cos

      public static float cos(float paramFloat)
    • sin

      public static float sin(double paramFloat)
    • cos

      public static float cos(double paramFloat)
    • floor

      public static int floor(double d0)
    • floor_double_long

      public static long floor_double_long(double d)
    • floor_float_int

      public static int floor_float_int(float f)
    • abs

      public static int abs(int number)
    • log2

      public static int log2(int bits)
    • getRandomNumberInRange

      public static int getRandomNumberInRange(Random random, int min, int max)
      Returns a random number between min and max, inclusive.
      Parameters:
      random - The random number generator.
      min - The minimum value.
      max - The maximum value.
      Returns:
      A random number between min and max, inclusive.
    • max

      public static double max(double first, double second, double third, double fourth)
    • ceil

      public static int ceil(float floatNumber)
    • clamp

      public static int clamp(int check, int min, int max)
    • denormalizeClamp

      public static double denormalizeClamp(double lowerBnd, double upperBnd, double slide)
    • denormalizeClamp

      public static float denormalizeClamp(float lowerBnd, float upperBnd, float slide)