net.minecraft.util

## Class MathHelper

- java.lang.Object
- - net.minecraft.util.MathHelper

-     public class MathHelper
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MathHelper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `abs_int(int par0)`
    `static double` | `abs_max(double par0, double par2)`
    `static float` | `abs(float par0)`
    `static double` | `average(long[] par0ArrayOfLong)`
    `static int` | `bucketInt(int par0, int par1)`
    `static int` | `calculateLogBaseTwo(int p_151239_0_)`
    `static int` | `ceiling_double_int(double par0)`
    `static int` | `ceiling_float_int(float par0)`
    `static double` | `clamp_double(double p_151237_0_, double p_151237_2_, double p_151237_4_)`
    `static float` | `clamp_float(float par0, float par1, float par2)`
    `static int` | `clamp_int(int par0, int par1, int par2)`
    `static float` | `cos(float par0)`
    `static double` | `denormalizeClamp(double p_151238_0_, double p_151238_2_, double p_151238_4_)`
    `static long` | `floor_double_long(double par0)`
    `static int` | `floor_double(double par0)`
    `static int` | `floor_float(float par0)`
    `static double` | `getRandomDoubleInRange(java.util.Random par0Random, double par1, double par3)`
    `static int` | `getRandomIntegerInRange(java.util.Random par0Random, int par1, int par2)`
    `static double` | `parseDoubleWithDefault(java.lang.String par0Str, double par1)`
    `static double` | `parseDoubleWithDefaultAndMax(java.lang.String par0Str, double par1, double par3)`
    `static int` | `parseIntWithDefault(java.lang.String par0Str, int par1)`
    `static int` | `parseIntWithDefaultAndMax(java.lang.String par0Str, int par1, int par2)`
    `static float` | `randomFloatClamp(java.util.Random p_151240_0_, float p_151240_1_, float p_151240_2_)`
    `static int` | `roundUpToPowerOfTwo(int p_151236_0_)`
    `static float` | `sin(float par0)`
    `static float` | `sqrt_double(double par0)`
    `static float` | `sqrt_float(float par0)`
    `static boolean` | `stringNullOrLengthZero(java.lang.String par0Str)`
    `static int` | `truncateDoubleToInt(double par0)`
    `static double` | `wrapAngleTo180_double(double par0)`
    `static float` | `wrapAngleTo180_float(float par0)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MathHelper

          public MathHelper()

  - ### Method Detail

    - #### sin

          public static final float sin(float par0)

    - #### cos

          public static final float cos(float par0)

    - #### sqrt_float

          public static final float sqrt_float(float par0)

    - #### sqrt_double

          public static final float sqrt_double(double par0)

    - #### floor_float

          public static int floor_float(float par0)

    - #### truncateDoubleToInt

          public static int truncateDoubleToInt(double par0)

    - #### floor_double

          public static int floor_double(double par0)

    - #### floor_double_long

          public static long floor_double_long(double par0)

    - #### abs

          public static float abs(float par0)

    - #### abs_int

          public static int abs_int(int par0)

    - #### ceiling_float_int

          public static int ceiling_float_int(float par0)

    - #### ceiling_double_int

          public static int ceiling_double_int(double par0)

    - #### clamp_int

          public static int clamp_int(int par0,
                      int par1,
                      int par2)

    - #### clamp_float

          public static float clamp_float(float par0,
                          float par1,
                          float par2)

    - #### clamp_double

          public static double clamp_double(double p_151237_0_,
                            double p_151237_2_,
                            double p_151237_4_)

    - #### denormalizeClamp

          public static double denormalizeClamp(double p_151238_0_,
                                double p_151238_2_,
                                double p_151238_4_)

    - #### abs_max

          public static double abs_max(double par0,
                       double par2)

    - #### bucketInt

          public static int bucketInt(int par0,
                      int par1)

    - #### stringNullOrLengthZero

          public static boolean stringNullOrLengthZero(java.lang.String par0Str)

    - #### getRandomIntegerInRange

          public static int getRandomIntegerInRange(java.util.Random par0Random,
                                    int par1,
                                    int par2)

    - #### randomFloatClamp

          public static float randomFloatClamp(java.util.Random p_151240_0_,
                               float p_151240_1_,
                               float p_151240_2_)

    - #### getRandomDoubleInRange

          public static double getRandomDoubleInRange(java.util.Random par0Random,
                                      double par1,
                                      double par3)

    - #### average

          public static double average(long[] par0ArrayOfLong)

    - #### wrapAngleTo180_float

          public static float wrapAngleTo180_float(float par0)

    - #### wrapAngleTo180_double

          public static double wrapAngleTo180_double(double par0)

    - #### parseIntWithDefault

          public static int parseIntWithDefault(java.lang.String par0Str,
                                int par1)

    - #### parseIntWithDefaultAndMax

          public static int parseIntWithDefaultAndMax(java.lang.String par0Str,
                                      int par1,
                                      int par2)

    - #### parseDoubleWithDefault

          public static double parseDoubleWithDefault(java.lang.String par0Str,
                                      double par1)

    - #### parseDoubleWithDefaultAndMax

          public static double parseDoubleWithDefaultAndMax(java.lang.String par0Str,
                                            double par1,
                                            double par3)

    - #### roundUpToPowerOfTwo

          public static int roundUpToPowerOfTwo(int p_151236_0_)

    - #### calculateLogBaseTwo

          public static int calculateLogBaseTwo(int p_151239_0_)