Package net.minecraft.util.math
Class MathHelper
java.lang.Object
net.minecraft.util.math.MathHelper
public class MathHelper extends Object
- Mappings:
Namespace Name official nsintermediary net/minecraft/class_1704named net/minecraft/util/math/MathHelper
-
Field Summary
Fields Modifier and Type Field Description private static double[]ARCSINE_TABLEprivate static double[]COSINE_TABLEprivate static int[]MULTIPLY_DE_BRUIJN_BIT_POSITIONprivate static float[]SINE_TABLEprivate static doubleSMALLEST_FRACTION_FREE_DOUBLEstatic floatSQUARE_ROOT_OF_TWO -
Constructor Summary
Constructors Constructor Description MathHelper() -
Method Summary
Modifier and Type Method Description static floatabs(float f)static intabs(int i)static intabsFloor(double d)static doubleabsMax(double double2, double double3)static doubleatan2(double double2, double double3)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 booleanepsilonEquals(float float2, float float3)static intfastFloor(double d)static doublefastInverseSqrt(double x)static intfloor(double d)static intfloor(float f)static intfloorDiv(int int2, int int3)static longhashCode(int x, int y, int z)static longhashCode(Vec3i vec)static inthsvToRgb(float hue, float saturation, float value)private static booleanisPowerOfTwo(int int2)static longlfloor(double d)static intlog2(int int2)private static intlog2DeBruijn(int int2)static intmethod_6632(String string, int int2)static intmethod_6645(int int2, int int3)static intmethod_6657(int int2, int int3)static doublemethod_6665(double double2)static doubleminusDiv(double numerator, double delta, double denominator)static doublenextDouble(Random random, double min, double max)static floatnextFloat(Random random, float min, float max)static intnextInt(Random random, int min, int max)static 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 double2)static intparseInt(String string, int fallback, int minimum)static 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 double2)static floatwrapDegrees(float float2)
-
Field Details
-
SQUARE_ROOT_OF_TWO
public static final float SQUARE_ROOT_OF_TWO- Mappings:
Namespace Name Mixin selector official aLns;a:Fintermediary field_7150Lnet/minecraft/class_1704;field_7150: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 bLns;b:[Fintermediary field_7151Lnet/minecraft/class_1704;field_7151:[Fnamed SINE_TABLELnet/minecraft/util/math/MathHelper;SINE_TABLE:[F
-
MULTIPLY_DE_BRUIJN_BIT_POSITION
private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION- Mappings:
Namespace Name Mixin selector official cLns;c:[Iintermediary field_7152Lnet/minecraft/class_1704;field_7152:[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 dLns;d:Dintermediary field_7153Lnet/minecraft/class_1704;field_7153: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 eLns;e:[Dintermediary field_7154Lnet/minecraft/class_1704;field_7154:[Dnamed ARCSINE_TABLELnet/minecraft/util/math/MathHelper;ARCSINE_TABLE:[D
-
COSINE_TABLE
private static final double[] COSINE_TABLE- Mappings:
Namespace Name Mixin selector official fLns;f:[Dintermediary field_7155Lnet/minecraft/class_1704;field_7155:[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 aLns;a(F)Fintermediary method_6623Lnet/minecraft/class_1704;method_6623(F)Fnamed sinLnet/minecraft/util/math/MathHelper;sin(F)F
-
cos
public static float cos(float f)- Mappings:
Namespace Name Mixin selector official bLns;b(F)Fintermediary method_6642Lnet/minecraft/class_1704;method_6642(F)Fnamed cosLnet/minecraft/util/math/MathHelper;cos(F)F
-
sqrt
public static float sqrt(float f)- Mappings:
Namespace Name Mixin selector official cLns;c(F)Fintermediary method_6649Lnet/minecraft/class_1704;method_6649(F)Fnamed sqrtLnet/minecraft/util/math/MathHelper;sqrt(F)F
-
sqrt
public static float sqrt(double d)- Mappings:
Namespace Name Mixin selector official aLns;a(D)Fintermediary method_6620Lnet/minecraft/class_1704;method_6620(D)Fnamed sqrtLnet/minecraft/util/math/MathHelper;sqrt(D)F
-
floor
public static int floor(float f)- Mappings:
Namespace Name Mixin selector official dLns;d(F)Iintermediary method_6655Lnet/minecraft/class_1704;method_6655(F)Inamed floorLnet/minecraft/util/math/MathHelper;floor(F)I
-
fastFloor
- Mappings:
Namespace Name Mixin selector official bLns;b(D)Iintermediary method_6639Lnet/minecraft/class_1704;method_6639(D)Inamed fastFloorLnet/minecraft/util/math/MathHelper;fastFloor(D)I
-
floor
public static int floor(double d)- Mappings:
Namespace Name Mixin selector official cLns;c(D)Iintermediary method_6647Lnet/minecraft/class_1704;method_6647(D)Inamed floorLnet/minecraft/util/math/MathHelper;floor(D)I
-
lfloor
public static long lfloor(double d)- Mappings:
Namespace Name Mixin selector official dLns;d(D)Jintermediary method_6654Lnet/minecraft/class_1704;method_6654(D)Jnamed lfloorLnet/minecraft/util/math/MathHelper;lfloor(D)J
-
absFloor
- Mappings:
Namespace Name Mixin selector official eLns;e(D)Iintermediary method_6658Lnet/minecraft/class_1704;method_6658(D)Inamed absFloorLnet/minecraft/util/math/MathHelper;absFloor(D)I
-
abs
public static float abs(float f)- Mappings:
Namespace Name Mixin selector official eLns;e(F)Fintermediary method_6659Lnet/minecraft/class_1704;method_6659(F)Fnamed absLnet/minecraft/util/math/MathHelper;abs(F)F
-
abs
public static int abs(int i)- Mappings:
Namespace Name Mixin selector official aLns;a(I)Iintermediary method_6626Lnet/minecraft/class_1704;method_6626(I)Inamed absLnet/minecraft/util/math/MathHelper;abs(I)I
-
ceil
public static int ceil(float f)- Mappings:
Namespace Name Mixin selector official fLns;f(F)Iintermediary method_6662Lnet/minecraft/class_1704;method_6662(F)Inamed ceilLnet/minecraft/util/math/MathHelper;ceil(F)I
-
ceil
public static int ceil(double d)- Mappings:
Namespace Name Mixin selector official fLns;f(D)Iintermediary method_6661Lnet/minecraft/class_1704;method_6661(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 aLns;a(III)Iintermediary method_6628Lnet/minecraft/class_1704;method_6628(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 aLns;a(FFF)Fintermediary method_6625Lnet/minecraft/class_1704;method_6625(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 aLns;a(DDD)Dintermediary method_6622Lnet/minecraft/class_1704;method_6622(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 bLns;b(DDD)Dintermediary method_6641Lnet/minecraft/class_1704;method_6641(DDD)Dnamed clampedLerpLnet/minecraft/util/math/MathHelper;clampedLerp(DDD)D
-
absMax
public static double absMax(double double2, double double3)- Mappings:
Namespace Name Mixin selector official aLns;a(DD)Dintermediary method_6621Lnet/minecraft/class_1704;method_6621(DD)Dnamed absMaxLnet/minecraft/util/math/MathHelper;absMax(DD)D
-
floorDiv
- Mappings:
Namespace Name Mixin selector official aLns;a(II)Iintermediary method_6627Lnet/minecraft/class_1704;method_6627(II)Inamed floorDivLnet/minecraft/util/math/MathHelper;floorDiv(II)I
-
nextInt
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/util/Random;II)Iintermediary method_6637Lnet/minecraft/class_1704;method_6637(Ljava/util/Random;II)Inamed nextIntLnet/minecraft/util/math/MathHelper;nextInt(Ljava/util/Random;II)I
-
nextFloat
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/util/Random;FF)Fintermediary method_6636Lnet/minecraft/class_1704;method_6636(Ljava/util/Random;FF)Fnamed nextFloatLnet/minecraft/util/math/MathHelper;nextFloat(Ljava/util/Random;FF)F
-
nextDouble
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/util/Random;DD)Dintermediary method_6635Lnet/minecraft/class_1704;method_6635(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 aLns;a([J)Dintermediary method_6638Lnet/minecraft/class_1704;method_6638([J)Dnamed averageLnet/minecraft/util/math/MathHelper;average([J)D
-
epsilonEquals
- Mappings:
Namespace Name Mixin selector official aLns;a(FF)Zintermediary method_6624Lnet/minecraft/class_1704;method_6624(FF)Znamed epsilonEqualsLnet/minecraft/util/math/MathHelper;epsilonEquals(FF)Z
-
method_6645
- Mappings:
Namespace Name Mixin selector official bLns;b(II)Iintermediary method_6645Lnet/minecraft/class_1704;method_6645(II)Inamed method_6645Lnet/minecraft/util/math/MathHelper;method_6645(II)I
-
wrapDegrees
public static float wrapDegrees(float float2)- Mappings:
Namespace Name Mixin selector official gLns;g(F)Fintermediary method_6664Lnet/minecraft/class_1704;method_6664(F)Fnamed wrapDegreesLnet/minecraft/util/math/MathHelper;wrapDegrees(F)F
-
wrapDegrees
public static double wrapDegrees(double double2)- Mappings:
Namespace Name Mixin selector official gLns;g(D)Dintermediary method_6663Lnet/minecraft/class_1704;method_6663(D)Dnamed wrapDegreesLnet/minecraft/util/math/MathHelper;wrapDegrees(D)D
-
method_6632
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/lang/String;I)Iintermediary method_6632Lnet/minecraft/class_1704;method_6632(Ljava/lang/String;I)Inamed method_6632Lnet/minecraft/util/math/MathHelper;method_6632(Ljava/lang/String;I)I
-
parseInt
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/lang/String;II)Iintermediary method_6633Lnet/minecraft/class_1704;method_6633(Ljava/lang/String;II)Inamed parseIntLnet/minecraft/util/math/MathHelper;parseInt(Ljava/lang/String;II)I
-
parseDouble
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/lang/String;D)Dintermediary method_6630Lnet/minecraft/class_1704;method_6630(Ljava/lang/String;D)Dnamed parseDoubleLnet/minecraft/util/math/MathHelper;parseDouble(Ljava/lang/String;D)D
-
parseDouble
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/lang/String;DD)Dintermediary method_6631Lnet/minecraft/class_1704;method_6631(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 bLns;b(I)Iintermediary method_6644Lnet/minecraft/class_1704;method_6644(I)Inamed smallestEncompassingPowerOfTwoLnet/minecraft/util/math/MathHelper;smallestEncompassingPowerOfTwo(I)I
-
isPowerOfTwo
private static boolean isPowerOfTwo(int int2)- Mappings:
Namespace Name Mixin selector official dLns;d(I)Zintermediary method_6656Lnet/minecraft/class_1704;method_6656(I)Znamed isPowerOfTwoLnet/minecraft/util/math/MathHelper;isPowerOfTwo(I)Z
-
log2DeBruijn
private static int log2DeBruijn(int int2)- Mappings:
Namespace Name Mixin selector official eLns;e(I)Iintermediary method_6660Lnet/minecraft/class_1704;method_6660(I)Inamed log2DeBruijnLnet/minecraft/util/math/MathHelper;log2DeBruijn(I)I
-
log2
public static int log2(int int2)- Mappings:
Namespace Name Mixin selector official cLns;c(I)Iintermediary method_6651Lnet/minecraft/class_1704;method_6651(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 cLns;c(II)Iintermediary method_6652Lnet/minecraft/class_1704;method_6652(II)Inamed roundUpLnet/minecraft/util/math/MathHelper;roundUp(II)I
-
packRgb
- Mappings:
Namespace Name Mixin selector official bLns;b(FFF)Iintermediary method_6643Lnet/minecraft/class_1704;method_6643(FFF)Inamed packRgbLnet/minecraft/util/math/MathHelper;packRgb(FFF)I
-
packRgb
- Mappings:
Namespace Name Mixin selector official bLns;b(III)Iintermediary method_6646Lnet/minecraft/class_1704;method_6646(III)Inamed packRgbLnet/minecraft/util/math/MathHelper;packRgb(III)I
-
method_6657
- Mappings:
Namespace Name Mixin selector official dLns;d(II)Iintermediary method_6657Lnet/minecraft/class_1704;method_6657(II)Inamed method_6657Lnet/minecraft/util/math/MathHelper;method_6657(II)I
-
method_6665
- Mappings:
Namespace Name Mixin selector official hLns;h(D)Dintermediary method_6665Lnet/minecraft/class_1704;method_6665(D)Dnamed method_6665Lnet/minecraft/util/math/MathHelper;method_6665(D)D
-
hashCode
- Mappings:
Namespace Name Mixin selector official aLns;a(Ldf;)Jintermediary method_6629Lnet/minecraft/class_1704;method_6629(Lnet/minecraft/class_1400;)Jnamed hashCodeLnet/minecraft/util/math/MathHelper;hashCode(Lnet/minecraft/util/math/Vec3i;)J
-
hashCode
- Mappings:
Namespace Name Mixin selector official cLns;c(III)Jintermediary method_6653Lnet/minecraft/class_1704;method_6653(III)Jnamed hashCodeLnet/minecraft/util/math/MathHelper;hashCode(III)J
-
randomUuid
- Mappings:
Namespace Name Mixin selector official aLns;a(Ljava/util/Random;)Ljava/util/UUID;intermediary method_6634Lnet/minecraft/class_1704;method_6634(Ljava/util/Random;)Ljava/util/UUID;named randomUuidLnet/minecraft/util/math/MathHelper;randomUuid(Ljava/util/Random;)Ljava/util/UUID;
-
minusDiv
public static double minusDiv(double numerator, double delta, double denominator)- Mappings:
Namespace Name Mixin selector official cLns;c(DDD)Dintermediary method_6648Lnet/minecraft/class_1704;method_6648(DDD)Dnamed minusDivLnet/minecraft/util/math/MathHelper;minusDiv(DDD)D
-
atan2
public static double atan2(double double2, double double3)- Mappings:
Namespace Name Mixin selector official bLns;b(DD)Dintermediary method_6640Lnet/minecraft/class_1704;method_6640(DD)Dnamed atan2Lnet/minecraft/util/math/MathHelper;atan2(DD)D
-
fastInverseSqrt
public static double fastInverseSqrt(double x)- Mappings:
Namespace Name Mixin selector official iLns;i(D)Dintermediary method_6666Lnet/minecraft/class_1704;method_6666(D)Dnamed fastInverseSqrtLnet/minecraft/util/math/MathHelper;fastInverseSqrt(D)D
-
hsvToRgb
- Mappings:
Namespace Name Mixin selector official cLns;c(FFF)Iintermediary method_6650Lnet/minecraft/class_1704;method_6650(FFF)Inamed hsvToRgbLnet/minecraft/util/math/MathHelper;hsvToRgb(FFF)I
-