Package net.minecraft.util.math
Class MathHelper
java.lang.Object
net.minecraft.util.math.MathHelper
- Mappings:
Namespace Name official onintermediary net/minecraft/class_837named net/minecraft/util/math/MathHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double[]private static final double[]private static final int[]private static final Randomprivate static final float[]private static final doublestatic final float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatabs(float f) static intabs(int i) static intabsFloor(double d) static doubleabsMax(double a, double b) static booleanapproximatelyEquals(float a, float b) static doubleatan2(double y, double x) static doubleaverage(long[] array) static intceil(double d) static intceil(float f) static doubleclamp(double value, double min, double max) static floatclamp(float value, float min, float max) static intclamp(int value, int min, int max) static doubleclampedLerp(double start, double end, double delta) static floatcos(float f) static intfastFloor(double d) static doublefastInverseSqrt(double x) static intfloor(double d) static intfloor(float f) static intfloorDiv(int dividend, int divisor) static floatfloorMod(float dividend, float divisor) static intfloorMod(int dividend, int divisor) static doublefractionalPart(double value) static longhashCode(int x, int y, int z) static longstatic inthsvToRgb(float hue, float saturation, float value) static intidealHash(int value) private static booleanisPowerOfTwo(int value) static longlfloor(double d) static intlog2(int value) static intlog2DeBruijn(int value) static doubleminusDiv(double numerator, double delta, double denominator) static intmultiplyColors(int color1, int color2) static doublenextDouble(Random random, double min, double max) static floatstatic intstatic intpackRgb(float r, float g, float b) static intpackRgb(int r, int g, int b) static doubleparseDouble(String string, double fallback) static doubleparseDouble(String string, double fallback, double minimum) static intstatic intstatic UUIDstatic UUIDrandomUuid(Random random) static introundUp(int int2, int int3) static floatsin(float f) static intsmallestEncompassingPowerOfTwo(int value) static floatsqrt(double d) static floatsqrt(float f) static doublewrapDegrees(double degrees) static floatwrapDegrees(float degrees) static intwrapDegrees(int degrees)
-
Field Details
-
SQUARE_ROOT_OF_TWO
public static final float SQUARE_ROOT_OF_TWO- Mappings:
Namespace Name Mixin selector official aLon;a:Fintermediary field_11855Lnet/minecraft/class_837;field_11855:Fnamed SQUARE_ROOT_OF_TWOLnet/minecraft/util/math/MathHelper;SQUARE_ROOT_OF_TWO:F
-
SINE_TABLE
private static final float[] SINE_TABLE- Mappings:
Namespace Name Mixin selector official bLon;b:[Fintermediary field_3085Lnet/minecraft/class_837;field_3085:[Fnamed SINE_TABLELnet/minecraft/util/math/MathHelper;SINE_TABLE:[F
-
RANDOM
- Mappings:
Namespace Name Mixin selector official cLon;c:Ljava/util/Random;intermediary field_14378Lnet/minecraft/class_837;field_14378:Ljava/util/Random;named RANDOMLnet/minecraft/util/math/MathHelper;RANDOM:Ljava/util/Random;
-
MULTIPLY_DE_BRUIJN_BIT_POSITION
private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION- Mappings:
Namespace Name Mixin selector official dLon;d:[Iintermediary field_9065Lnet/minecraft/class_837;field_9065:[Inamed MULTIPLY_DE_BRUIJN_BIT_POSITIONLnet/minecraft/util/math/MathHelper;MULTIPLY_DE_BRUIJN_BIT_POSITION:[I
-
SMALLEST_FRACTION_FREE_DOUBLE
private static final double SMALLEST_FRACTION_FREE_DOUBLE- Mappings:
Namespace Name Mixin selector official eLon;e:Dintermediary field_11856Lnet/minecraft/class_837;field_11856:Dnamed SMALLEST_FRACTION_FREE_DOUBLELnet/minecraft/util/math/MathHelper;SMALLEST_FRACTION_FREE_DOUBLE:D
-
ARCSINE_TABLE
private static final double[] ARCSINE_TABLE- Mappings:
Namespace Name Mixin selector official fLon;f:[Dintermediary field_11857Lnet/minecraft/class_837;field_11857:[Dnamed ARCSINE_TABLELnet/minecraft/util/math/MathHelper;ARCSINE_TABLE:[D
-
COSINE_TABLE
private static final double[] COSINE_TABLE- Mappings:
Namespace Name Mixin selector official gLon;g:[Dintermediary field_11858Lnet/minecraft/class_837;field_11858:[Dnamed COSINE_TABLELnet/minecraft/util/math/MathHelper;COSINE_TABLE:[D
-
-
Constructor Details
-
MathHelper
public MathHelper()
-
-
Method Details
-
sin
public static float sin(float f) - Mappings:
Namespace Name Mixin selector official aLon;a(F)Fintermediary method_2335Lnet/minecraft/class_837;method_2335(F)Fnamed sinLnet/minecraft/util/math/MathHelper;sin(F)F
-
cos
public static float cos(float f) - Mappings:
Namespace Name Mixin selector official bLon;b(F)Fintermediary method_2344Lnet/minecraft/class_837;method_2344(F)Fnamed cosLnet/minecraft/util/math/MathHelper;cos(F)F
-
sqrt
public static float sqrt(float f) - Mappings:
Namespace Name Mixin selector official cLon;c(F)Fintermediary method_2346Lnet/minecraft/class_837;method_2346(F)Fnamed sqrtLnet/minecraft/util/math/MathHelper;sqrt(F)F
-
sqrt
public static float sqrt(double d) - Mappings:
Namespace Name Mixin selector official aLon;a(D)Fintermediary method_2333Lnet/minecraft/class_837;method_2333(D)Fnamed sqrtLnet/minecraft/util/math/MathHelper;sqrt(D)F
-
floor
public static int floor(float f) - Mappings:
Namespace Name Mixin selector official dLon;d(F)Iintermediary method_2348Lnet/minecraft/class_837;method_2348(F)Inamed floorLnet/minecraft/util/math/MathHelper;floor(F)I
-
fastFloor
- Mappings:
Namespace Name Mixin selector official bLon;b(D)Iintermediary method_2343Lnet/minecraft/class_837;method_2343(D)Inamed fastFloorLnet/minecraft/util/math/MathHelper;fastFloor(D)I
-
floor
public static int floor(double d) - Mappings:
Namespace Name Mixin selector official cLon;c(D)Iintermediary method_2345Lnet/minecraft/class_837;method_2345(D)Inamed floorLnet/minecraft/util/math/MathHelper;floor(D)I
-
lfloor
public static long lfloor(double d) - Mappings:
Namespace Name Mixin selector official dLon;d(D)Jintermediary method_2347Lnet/minecraft/class_837;method_2347(D)Jnamed lfloorLnet/minecraft/util/math/MathHelper;lfloor(D)J
-
absFloor
- Mappings:
Namespace Name Mixin selector official eLon;e(D)Iintermediary method_8346Lnet/minecraft/class_837;method_8346(D)Inamed absFloorLnet/minecraft/util/math/MathHelper;absFloor(D)I
-
abs
public static float abs(float f) - Mappings:
Namespace Name Mixin selector official eLon;e(F)Fintermediary method_2349Lnet/minecraft/class_837;method_2349(F)Fnamed absLnet/minecraft/util/math/MathHelper;abs(F)F
-
abs
public static int abs(int i) - Mappings:
Namespace Name Mixin selector official aLon;a(I)Iintermediary method_2337Lnet/minecraft/class_837;method_2337(I)Inamed absLnet/minecraft/util/math/MathHelper;abs(I)I
-
ceil
public static int ceil(float f) - Mappings:
Namespace Name Mixin selector official fLon;f(F)Iintermediary method_2351Lnet/minecraft/class_837;method_2351(F)Inamed ceilLnet/minecraft/util/math/MathHelper;ceil(F)I
-
ceil
public static int ceil(double d) - Mappings:
Namespace Name Mixin selector official fLon;f(D)Iintermediary method_2350Lnet/minecraft/class_837;method_2350(D)Inamed ceilLnet/minecraft/util/math/MathHelper;ceil(D)I
-
clamp
public static int clamp(int value, int min, int max) - Mappings:
Namespace Name Mixin selector official aLon;a(III)Iintermediary method_2339Lnet/minecraft/class_837;method_2339(III)Inamed clampLnet/minecraft/util/math/MathHelper;clamp(III)I
-
clamp
public static float clamp(float value, float min, float max) - Mappings:
Namespace Name Mixin selector official aLon;a(FFF)Fintermediary method_2336Lnet/minecraft/class_837;method_2336(FFF)Fnamed clampLnet/minecraft/util/math/MathHelper;clamp(FFF)F
-
clamp
public static double clamp(double value, double min, double max) - Mappings:
Namespace Name Mixin selector official aLon;a(DDD)Dintermediary method_8339Lnet/minecraft/class_837;method_8339(DDD)Dnamed clampLnet/minecraft/util/math/MathHelper;clamp(DDD)D
-
clampedLerp
public static double clampedLerp(double start, double end, double delta) - Mappings:
Namespace Name Mixin selector official bLon;b(DDD)Dintermediary method_8341Lnet/minecraft/class_837;method_8341(DDD)Dnamed clampedLerpLnet/minecraft/util/math/MathHelper;clampedLerp(DDD)D
-
absMax
public static double absMax(double a, double b) - Mappings:
Namespace Name Mixin selector official aLon;a(DD)Dintermediary method_2334Lnet/minecraft/class_837;method_2334(DD)Dnamed absMaxLnet/minecraft/util/math/MathHelper;absMax(DD)D
-
floorDiv
- Mappings:
Namespace Name Mixin selector official aLon;a(II)Iintermediary method_2338Lnet/minecraft/class_837;method_2338(II)Inamed floorDivLnet/minecraft/util/math/MathHelper;floorDiv(II)I
-
nextInt
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/util/Random;II)Iintermediary method_2341Lnet/minecraft/class_837;method_2341(Ljava/util/Random;II)Inamed nextIntLnet/minecraft/util/math/MathHelper;nextInt(Ljava/util/Random;II)I
-
nextFloat
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/util/Random;FF)Fintermediary method_8340Lnet/minecraft/class_837;method_8340(Ljava/util/Random;FF)Fnamed nextFloatLnet/minecraft/util/math/MathHelper;nextFloat(Ljava/util/Random;FF)F
-
nextDouble
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/util/Random;DD)Dintermediary method_4420Lnet/minecraft/class_837;method_4420(Ljava/util/Random;DD)Dnamed nextDoubleLnet/minecraft/util/math/MathHelper;nextDouble(Ljava/util/Random;DD)D
-
average
public static double average(long[] array) - Mappings:
Namespace Name Mixin selector official aLon;a([J)Dintermediary method_2342Lnet/minecraft/class_837;method_2342([J)Dnamed averageLnet/minecraft/util/math/MathHelper;average([J)D
-
approximatelyEquals
- Mappings:
Namespace Name Mixin selector official aLon;a(FF)Zintermediary method_10839Lnet/minecraft/class_837;method_10839(FF)Znamed approximatelyEqualsLnet/minecraft/util/math/MathHelper;approximatelyEquals(FF)Z
-
floorMod
- Mappings:
Namespace Name Mixin selector official bLon;b(II)Iintermediary method_10844Lnet/minecraft/class_837;method_10844(II)Inamed floorModLnet/minecraft/util/math/MathHelper;floorMod(II)I
-
floorMod
- Mappings:
Namespace Name Mixin selector official bLon;b(FF)Fintermediary method_12879Lnet/minecraft/class_837;method_12879(FF)Fnamed floorModLnet/minecraft/util/math/MathHelper;floorMod(FF)F
-
wrapDegrees
public static float wrapDegrees(float degrees) - Mappings:
Namespace Name Mixin selector official gLon;g(F)Fintermediary method_2353Lnet/minecraft/class_837;method_2353(F)Fnamed wrapDegreesLnet/minecraft/util/math/MathHelper;wrapDegrees(F)F
-
wrapDegrees
public static double wrapDegrees(double degrees) - Mappings:
Namespace Name Mixin selector official gLon;g(D)Dintermediary method_2352Lnet/minecraft/class_837;method_2352(D)Dnamed wrapDegreesLnet/minecraft/util/math/MathHelper;wrapDegrees(D)D
-
wrapDegrees
public static int wrapDegrees(int degrees) - Mappings:
Namespace Name Mixin selector official bLon;b(I)Iintermediary method_12880Lnet/minecraft/class_837;method_12880(I)Inamed wrapDegreesLnet/minecraft/util/math/MathHelper;wrapDegrees(I)I
-
parseInt
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/lang/String;I)Iintermediary method_4418Lnet/minecraft/class_837;method_4418(Ljava/lang/String;I)Inamed parseIntLnet/minecraft/util/math/MathHelper;parseInt(Ljava/lang/String;I)I
-
parseInt
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/lang/String;II)Iintermediary method_4419Lnet/minecraft/class_837;method_4419(Ljava/lang/String;II)Inamed parseIntLnet/minecraft/util/math/MathHelper;parseInt(Ljava/lang/String;II)I
-
parseDouble
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/lang/String;D)Dintermediary method_4416Lnet/minecraft/class_837;method_4416(Ljava/lang/String;D)Dnamed parseDoubleLnet/minecraft/util/math/MathHelper;parseDouble(Ljava/lang/String;D)D
-
parseDouble
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/lang/String;DD)Dintermediary method_4417Lnet/minecraft/class_837;method_4417(Ljava/lang/String;DD)Dnamed parseDoubleLnet/minecraft/util/math/MathHelper;parseDouble(Ljava/lang/String;DD)D
-
smallestEncompassingPowerOfTwo
public static int smallestEncompassingPowerOfTwo(int value) - Mappings:
Namespace Name Mixin selector official cLon;c(I)Iintermediary method_8342Lnet/minecraft/class_837;method_8342(I)Inamed smallestEncompassingPowerOfTwoLnet/minecraft/util/math/MathHelper;smallestEncompassingPowerOfTwo(I)I
-
isPowerOfTwo
private static boolean isPowerOfTwo(int value) - Mappings:
Namespace Name Mixin selector official gLon;g(I)Zintermediary method_8345Lnet/minecraft/class_837;method_8345(I)Znamed isPowerOfTwoLnet/minecraft/util/math/MathHelper;isPowerOfTwo(I)Z
-
log2DeBruijn
public static int log2DeBruijn(int value) - Mappings:
Namespace Name Mixin selector official dLon;d(I)Iintermediary method_8347Lnet/minecraft/class_837;method_8347(I)Inamed log2DeBruijnLnet/minecraft/util/math/MathHelper;log2DeBruijn(I)I
-
log2
public static int log2(int value) - Mappings:
Namespace Name Mixin selector official eLon;e(I)Iintermediary method_8344Lnet/minecraft/class_837;method_8344(I)Inamed log2Lnet/minecraft/util/math/MathHelper;log2(I)I
-
roundUp
public static int roundUp(int int2, int int3) - Mappings:
Namespace Name Mixin selector official cLon;c(II)Iintermediary method_8343Lnet/minecraft/class_837;method_8343(II)Inamed roundUpLnet/minecraft/util/math/MathHelper;roundUp(II)I
-
packRgb
- Mappings:
Namespace Name Mixin selector official bLon;b(FFF)Iintermediary method_10843Lnet/minecraft/class_837;method_10843(FFF)Inamed packRgbLnet/minecraft/util/math/MathHelper;packRgb(FFF)I
-
packRgb
- Mappings:
Namespace Name Mixin selector official bLon;b(III)Iintermediary method_10845Lnet/minecraft/class_837;method_10845(III)Inamed packRgbLnet/minecraft/util/math/MathHelper;packRgb(III)I
-
multiplyColors
- Mappings:
Namespace Name Mixin selector official dLon;d(II)Iintermediary method_10849Lnet/minecraft/class_837;method_10849(II)Inamed multiplyColorsLnet/minecraft/util/math/MathHelper;multiplyColors(II)I
-
fractionalPart
- Mappings:
Namespace Name Mixin selector official hLon;h(D)Dintermediary method_10850Lnet/minecraft/class_837;method_10850(D)Dnamed fractionalPartLnet/minecraft/util/math/MathHelper;fractionalPart(D)D
-
hashCode
- Mappings:
Namespace Name Mixin selector official aLon;a(Ldh;)Jintermediary method_10840Lnet/minecraft/class_837;method_10840(Lnet/minecraft/class_1167;)Jnamed hashCodeLnet/minecraft/util/math/MathHelper;hashCode(Lnet/minecraft/util/math/Vec3i;)J
-
hashCode
- Mappings:
Namespace Name Mixin selector official cLon;c(III)Jintermediary method_10848Lnet/minecraft/class_837;method_10848(III)Jnamed hashCodeLnet/minecraft/util/math/MathHelper;hashCode(III)J
-
randomUuid
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/util/Random;)Ljava/util/UUID;intermediary method_10841Lnet/minecraft/class_837;method_10841(Ljava/util/Random;)Ljava/util/UUID;named randomUuidLnet/minecraft/util/math/MathHelper;randomUuid(Ljava/util/Random;)Ljava/util/UUID;
-
randomUuid
- Mappings:
Namespace Name Mixin selector official aLon;a()Ljava/util/UUID;intermediary method_12878Lnet/minecraft/class_837;method_12878()Ljava/util/UUID;named randomUuidLnet/minecraft/util/math/MathHelper;randomUuid()Ljava/util/UUID;
-
minusDiv
public static double minusDiv(double numerator, double delta, double denominator) - Mappings:
Namespace Name Mixin selector official cLon;c(DDD)Dintermediary method_10846Lnet/minecraft/class_837;method_10846(DDD)Dnamed minusDivLnet/minecraft/util/math/MathHelper;minusDiv(DDD)D
-
atan2
public static double atan2(double y, double x) - Mappings:
Namespace Name Mixin selector official bLon;b(DD)Dintermediary method_10842Lnet/minecraft/class_837;method_10842(DD)Dnamed atan2Lnet/minecraft/util/math/MathHelper;atan2(DD)D
-
fastInverseSqrt
public static double fastInverseSqrt(double x) - Mappings:
Namespace Name Mixin selector official iLon;i(D)Dintermediary method_10851Lnet/minecraft/class_837;method_10851(D)Dnamed fastInverseSqrtLnet/minecraft/util/math/MathHelper;fastInverseSqrt(D)D
-
hsvToRgb
- Mappings:
Namespace Name Mixin selector official cLon;c(FFF)Iintermediary method_10847Lnet/minecraft/class_837;method_10847(FFF)Inamed hsvToRgbLnet/minecraft/util/math/MathHelper;hsvToRgb(FFF)I
-
idealHash
public static int idealHash(int value) - Mappings:
Namespace Name Mixin selector official fLon;f(I)Iintermediary method_12881Lnet/minecraft/class_837;method_12881(I)Inamed idealHashLnet/minecraft/util/math/MathHelper;idealHash(I)I
-