Class MathHelper
float-specific extensions
 to Math, linear interpolation (lerp), and color-related methods.
 Trigonometric functions defined in this class use the "sine table", a pre-calculated
 table of sin(N) (0 <= N < pi * 2).
- Mappings:
- Namespace - Name - official - apa- intermediary - net/minecraft/class_3532- named - net/minecraft/util/math/MathHelper
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final doubleUsed for the third-order Maclaurin series approximation of the arcsin function, x + x^3/6.private static final double[]Holds values of arcsin(x):ARCSINE_TABLE[i]is equal toMath.arcsin(i / 256.0).private static final intThe total number of entries inARCSINE_TABLEandCOSINE_OF_ARCSINE_TABLE.private static final double[]Holds values of cos(arcsin(x)):COSINE_OF_ARCSINE_TABLE[i]is equal toMath.cos(Math.arcsin(i / 256.0)).static final floatprivate static final floatstatic final floatprivate static final longprivate static final longprivate static final longprivate static final intstatic final floatprivate static final longprivate static final int[]static final floatstatic final floatprivate static final Randomprivate static final doubleA constant for rounding a double to the nearest multiple of 1/256.private static final float[]static final floatstatic final floatTau is equal to2 * PI.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic floatabs(float value) static intabs(int value) static doubleabsMax(double a, double b) static floatangleBetween(float first, float second) static booleanapproximatelyEquals(double a, double b) static booleanapproximatelyEquals(float a, float b) static doubleatan2(double y, double x) Returns an approximation ofMath.atan2(y, x).static intbinarySearch(int min, int max, IntPredicate predicate) Finds the minimum value in[min, max)that satisfies the monotonicpredicate.static floatcatmullRom(float delta, float p0, float p1, float p2, float p3) Interpolates a point on a Catmull-Rom Spline.static intceil(double value) static intceil(float value) static intceilDiv(int a, int b) static intceilLog2(int value) Returns ceil(log2(value)).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 floatclampAngle(float value, float mean, float delta) Clampsvalue, as an angle, betweenmean - deltaandmean + deltadegrees.static doubleclampedLerp(double start, double end, double delta) static floatclampedLerp(float start, float end, float delta) static doubleclampedMap(double value, double oldStart, double oldEnd, double newStart, double newEnd) Linearly maps a value from one number range to another and clamps the result.static floatclampedMap(float value, float oldStart, float oldEnd, float newStart, float newEnd) Linearly maps a value from one number range to another and clamps the result.static floatcos(float value) static floatfastInverseCbrt(float x) Returns an approximation of1 / Math.cbrt(x).static doublefastInverseSqrt(double x) Deprecated.static intfloor(double value) static intfloor(float value) static intfloorDiv(int dividend, int divisor) static intfloorLog2(int value) Returns floor(log2(value)).static doublefloorMod(double dividend, double divisor) static floatfloorMod(float dividend, float divisor) static intfloorMod(int dividend, int divisor) static doublefractionalPart(double value) static floatfractionalPart(float value) static doublegetLerpProgress(double value, double start, double end) Gets the fraction of the way thatvalueis betweenstartandend.static floatgetLerpProgress(float value, float start, float end) static longhashCode(int x, int y, int z) Deprecated.static longDeprecated.static inthsvToRgb(float hue, float saturation, float value) static doublehypot(double a, double b) static intidealHash(int value) static doubleinverseSqrt(double x) static floatinverseSqrt(float x) static booleanisMultipleOf(int a, int b) static booleanisPowerOfTwo(int value) static doublelerp(double delta, double start, double end) static floatlerp(float delta, float start, float end) static intlerp(float delta, int start, int end) static doublelerp2(double deltaX, double deltaY, double x0y0, double x1y0, double x0y1, double x1y1) A two-dimensional lerp between values on the 4 corners of the unit square.static doublelerp3(double deltaX, double deltaY, double deltaZ, double x0y0z0, double x1y0z0, double x0y1z0, double x1y1z0, double x0y0z1, double x1y0z1, double x0y1z1, double x1y1z1) A three-dimensional lerp between values on the 8 corners of the unit cube.static floatlerpAngleDegrees(float delta, float start, float end) static longlfloor(double value) static doublemagnitude(double a, double b, double c) static doublemap(double value, double oldStart, double oldEnd, double newStart, double newEnd) Linearly maps a value from one number range to another, unclamped.static floatmap(float value, float oldStart, float oldEnd, float newStart, float newEnd) Linearly maps a value from one number range to another, unclamped.static booleanmethod_34945(Vec3d origin, Vec3d direction, Box box) static doublemethod_34957(double double2) static floatnextBetween(Random random, float min, float max) static intnextBetween(Random random, int min, int max) Returns a random, uniformly distributed integer value in[min, max].static doublenextDouble(Random random, double min, double max) static floatstatic floatnextGaussian(Random random, float mean, float deviation) static intReturns a random, uniformly distributed integer value in[min, max].static intpackRgb(float r, float g, float b) static intstatic doubleperlinFade(double value) static doubleperlinFadeDerivative(double value) static UUIDstatic UUIDrandomUuid(Random random) static introundDownToMultiple(double a, int b) Returnsarounded down to the nearest multiple ofb.static introundUpToMultiple(int value, int divisor) Returns a value farther than or as far asvaluefrom zero that is a multiple ofdivisor.static intsign(double value) static floatsin(float value) static intsmallestEncompassingPowerOfTwo(int value) static floatsqrt(float value) static doublesquare(double n) static floatsquare(float n) static intsquare(int n) static longsquare(long n) static doublesquaredHypot(double a, double b) static doublesquaredMagnitude(double a, double b, double c) static floatstepTowards(float from, float to, float step) Steps fromfromtowardsto, changing the value by at moststep.static floatstepUnwrappedAngleTowards(float from, float to, float step) Steps fromfromdegrees towardstodegrees, changing the value by at moststepdegrees.static IntStreamstream(int seed, int lowerBound, int upperBound) static IntStreamstream(int seed, int lowerBound, int upperBound, int steps) static floatsubtractAngles(float start, float end) static floatwrap(float value, float maxDeviation) static doublewrapDegrees(double degrees) Wraps an angle in degrees to the interval[-180, 180).static floatwrapDegrees(float degrees) Wraps an angle in degrees to the interval[-180, 180).static intwrapDegrees(int degrees) Wraps an angle in degrees to the interval[-180, 180).
- 
Field Details- 
field_29852private static final long field_29852- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - h- Lapa;h:J- intermediary - field_29852- Lnet/minecraft/class_3532;field_29852:J- named - field_29852- Lnet/minecraft/util/math/MathHelper;field_29852:J
 
- 
HALF_PI_RADIANS_SINE_TABLE_INDEXprivate static final long HALF_PI_RADIANS_SINE_TABLE_INDEX- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - i- Lapa;i:J- intermediary - field_29853- Lnet/minecraft/class_3532;field_29853:J- named - HALF_PI_RADIANS_SINE_TABLE_INDEX- Lnet/minecraft/util/math/MathHelper;HALF_PI_RADIANS_SINE_TABLE_INDEX:J
 
- 
field_29854private static final long field_29854- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - j- Lapa;j:J- intermediary - field_29854- Lnet/minecraft/class_3532;field_29854:J- named - field_29854- Lnet/minecraft/util/math/MathHelper;field_29854:J
 
- 
field_29855private static final long field_29855- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - k- Lapa;k:J- intermediary - field_29855- Lnet/minecraft/class_3532;field_29855:J- named - field_29855- Lnet/minecraft/util/math/MathHelper;field_29855:J
 
- 
PIpublic static final float PI- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a:F- intermediary - field_29844- Lnet/minecraft/class_3532;field_29844:F- named - PI- Lnet/minecraft/util/math/MathHelper;PI:F
 
- 
HALF_PIpublic static final float HALF_PI- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b:F- intermediary - field_29845- Lnet/minecraft/class_3532;field_29845:F- named - HALF_PI- Lnet/minecraft/util/math/MathHelper;HALF_PI:F
 
- 
TAUpublic static final float TAUTau is equal to2 * PI.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c:F- intermediary - field_29846- Lnet/minecraft/class_3532;field_29846:F- named - TAU- Lnet/minecraft/util/math/MathHelper;TAU:F
 
- 
RADIANS_PER_DEGREEpublic static final float RADIANS_PER_DEGREE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d:F- intermediary - field_29847- Lnet/minecraft/class_3532;field_29847:F- named - RADIANS_PER_DEGREE- Lnet/minecraft/util/math/MathHelper;RADIANS_PER_DEGREE:F
 
- 
DEGREES_PER_RADIANpublic static final float DEGREES_PER_RADIAN- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e:F- intermediary - field_29848- Lnet/minecraft/class_3532;field_29848:F- named - DEGREES_PER_RADIAN- Lnet/minecraft/util/math/MathHelper;DEGREES_PER_RADIAN:F
 
- 
EPSILONpublic static final float EPSILON- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f:F- intermediary - field_29849- Lnet/minecraft/class_3532;field_29849:F- named - EPSILON- Lnet/minecraft/util/math/MathHelper;EPSILON:F
 
- 
SQUARE_ROOT_OF_TWOpublic static final float SQUARE_ROOT_OF_TWO- Mappings:
- Namespace - Name - Mixin selector - official - g- Lapa;g:F- intermediary - field_15724- Lnet/minecraft/class_3532;field_15724:F- named - SQUARE_ROOT_OF_TWO- Lnet/minecraft/util/math/MathHelper;SQUARE_ROOT_OF_TWO:F
 
- 
DEGREES_TO_SINE_TABLE_INDEXprivate static final float DEGREES_TO_SINE_TABLE_INDEX- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - l- Lapa;l:F- intermediary - field_29856- Lnet/minecraft/class_3532;field_29856:F- named - DEGREES_TO_SINE_TABLE_INDEX- Lnet/minecraft/util/math/MathHelper;DEGREES_TO_SINE_TABLE_INDEX:F
 
- 
SINE_TABLEprivate static final float[] SINE_TABLE- Mappings:
- Namespace - Name - Mixin selector - official - m- Lapa;m:[F- intermediary - field_15725- Lnet/minecraft/class_3532;field_15725:[F- named - SINE_TABLE- Lnet/minecraft/util/math/MathHelper;SINE_TABLE:[F
 
- 
RANDOM- Mappings:
- Namespace - Name - Mixin selector - official - n- Lapa;n:Lapf;- intermediary - field_15726- Lnet/minecraft/class_3532;field_15726:Lnet/minecraft/class_5819;- named - RANDOM- Lnet/minecraft/util/math/MathHelper;RANDOM:Lnet/minecraft/util/math/random/Random;
 
- 
MULTIPLY_DE_BRUIJN_BIT_POSITIONprivate static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION- Mappings:
- Namespace - Name - Mixin selector - official - o- Lapa;o:[I- intermediary - field_15723- Lnet/minecraft/class_3532;field_15723:[I- named - MULTIPLY_DE_BRUIJN_BIT_POSITION- Lnet/minecraft/util/math/MathHelper;MULTIPLY_DE_BRUIJN_BIT_POSITION:[I
 
- 
ARCSINE_MACLAURIN_3private static final double ARCSINE_MACLAURIN_3Used for the third-order Maclaurin series approximation of the arcsin function, x + x^3/6.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - p- Lapa;p:D- intermediary - field_29857- Lnet/minecraft/class_3532;field_29857:D- named - ARCSINE_MACLAURIN_3- Lnet/minecraft/util/math/MathHelper;ARCSINE_MACLAURIN_3:D
 
- 
field_29858private static final int field_29858- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - q- Lapa;q:I- intermediary - field_29858- Lnet/minecraft/class_3532;field_29858:I- named - field_29858- Lnet/minecraft/util/math/MathHelper;field_29858:I
 
- 
ARCSINE_TABLE_LENGTHprivate static final int ARCSINE_TABLE_LENGTHThe total number of entries inARCSINE_TABLEandCOSINE_OF_ARCSINE_TABLE.These tables have 257 elements because they store values for multiples of 1/256 from 0 to 1, inclusive. - See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - r- Lapa;r:I- intermediary - field_29859- Lnet/minecraft/class_3532;field_29859:I- named - ARCSINE_TABLE_LENGTH- Lnet/minecraft/util/math/MathHelper;ARCSINE_TABLE_LENGTH:I
 
- 
ROUNDER_256THSprivate static final double ROUNDER_256THSA constant for rounding a double to the nearest multiple of 1/256.When this constant is added to a double that is not too large, then the bits of the result's mantissa reflect the original number times 256. Consequently, adding this constant and then subtracting it rounds such doubles to the nearest multiple of 1/256. This is used by atan2(double, double)to produce an index intoARCSINE_TABLEandCOSINE_OF_ARCSINE_TABLE.- Mappings:
- Namespace - Name - Mixin selector - official - s- Lapa;s:D- intermediary - field_15728- Lnet/minecraft/class_3532;field_15728:D- named - ROUNDER_256THS- Lnet/minecraft/util/math/MathHelper;ROUNDER_256THS:D
 
- 
ARCSINE_TABLEprivate static final double[] ARCSINE_TABLEHolds values of arcsin(x):ARCSINE_TABLE[i]is equal toMath.arcsin(i / 256.0).This is used by atan2(double, double)to approximate the inverse tangent function.- Mappings:
- Namespace - Name - Mixin selector - official - t- Lapa;t:[D- intermediary - field_15727- Lnet/minecraft/class_3532;field_15727:[D- named - ARCSINE_TABLE- Lnet/minecraft/util/math/MathHelper;ARCSINE_TABLE:[D
 
- 
COSINE_OF_ARCSINE_TABLEprivate static final double[] COSINE_OF_ARCSINE_TABLEHolds values of cos(arcsin(x)):COSINE_OF_ARCSINE_TABLE[i]is equal toMath.cos(Math.arcsin(i / 256.0)).This is used by atan2(double, double)to approximate the inverse tangent function.- Mappings:
- Namespace - Name - Mixin selector - official - u- Lapa;u:[D- intermediary - field_15722- Lnet/minecraft/class_3532;field_15722:[D- named - COSINE_OF_ARCSINE_TABLE- Lnet/minecraft/util/math/MathHelper;COSINE_OF_ARCSINE_TABLE:[D
 
 
- 
- 
Constructor Details- 
MathHelperpublic MathHelper()
 
- 
- 
Method Details- 
sinpublic static float sin(float value) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(F)F- intermediary - method_15374- Lnet/minecraft/class_3532;method_15374(F)F- named - sin- Lnet/minecraft/util/math/MathHelper;sin(F)F
 
- 
cospublic static float cos(float value) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(F)F- intermediary - method_15362- Lnet/minecraft/class_3532;method_15362(F)F- named - cos- Lnet/minecraft/util/math/MathHelper;cos(F)F
 
- 
sqrtpublic static float sqrt(float value) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(F)F- intermediary - method_15355- Lnet/minecraft/class_3532;method_15355(F)F- named - sqrt- Lnet/minecraft/util/math/MathHelper;sqrt(F)F
 
- 
floorpublic static int floor(float value) - Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(F)I- intermediary - method_15375- Lnet/minecraft/class_3532;method_15375(F)I- named - floor- Lnet/minecraft/util/math/MathHelper;floor(F)I
 
- 
floorpublic static int floor(double value) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(D)I- intermediary - method_15357- Lnet/minecraft/class_3532;method_15357(D)I- named - floor- Lnet/minecraft/util/math/MathHelper;floor(D)I
 
- 
lfloorpublic static long lfloor(double value) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(D)J- intermediary - method_15372- Lnet/minecraft/class_3532;method_15372(D)J- named - lfloor- Lnet/minecraft/util/math/MathHelper;lfloor(D)J
 
- 
abspublic static float abs(float value) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(F)F- intermediary - method_15379- Lnet/minecraft/class_3532;method_15379(F)F- named - abs- Lnet/minecraft/util/math/MathHelper;abs(F)F
 
- 
abspublic static int abs(int value) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(I)I- intermediary - method_15382- Lnet/minecraft/class_3532;method_15382(I)I- named - abs- Lnet/minecraft/util/math/MathHelper;abs(I)I
 
- 
ceilpublic static int ceil(float value) - Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(F)I- intermediary - method_15386- Lnet/minecraft/class_3532;method_15386(F)I- named - ceil- Lnet/minecraft/util/math/MathHelper;ceil(F)I
 
- 
ceilpublic static int ceil(double value) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(D)I- intermediary - method_15384- Lnet/minecraft/class_3532;method_15384(D)I- named - ceil- Lnet/minecraft/util/math/MathHelper;ceil(D)I
 
- 
clamppublic static int clamp(int value, int min, int max) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(III)I- intermediary - method_15340- Lnet/minecraft/class_3532;method_15340(III)I- named - clamp- Lnet/minecraft/util/math/MathHelper;clamp(III)I
 
- 
clamppublic static float clamp(float value, float min, float max) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(FFF)F- intermediary - method_15363- Lnet/minecraft/class_3532;method_15363(FFF)F- named - clamp- Lnet/minecraft/util/math/MathHelper;clamp(FFF)F
 
- 
clamppublic static double clamp(double value, double min, double max) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DDD)D- intermediary - method_15350- Lnet/minecraft/class_3532;method_15350(DDD)D- named - clamp- Lnet/minecraft/util/math/MathHelper;clamp(DDD)D
 
- 
clampedLerppublic static double clampedLerp(double start, double end, double delta) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(DDD)D- intermediary - method_15390- Lnet/minecraft/class_3532;method_15390(DDD)D- named - clampedLerp- Lnet/minecraft/util/math/MathHelper;clampedLerp(DDD)D
 
- 
clampedLerppublic static float clampedLerp(float start, float end, float delta) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(FFF)F- intermediary - method_37166- Lnet/minecraft/class_3532;method_37166(FFF)F- named - clampedLerp- Lnet/minecraft/util/math/MathHelper;clampedLerp(FFF)F
 
- 
absMaxpublic static double absMax(double a, double b) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DD)D- intermediary - method_15391- Lnet/minecraft/class_3532;method_15391(DD)D- named - absMax- Lnet/minecraft/util/math/MathHelper;absMax(DD)D
 
- 
floorDivpublic static int floorDiv(int dividend, int divisor) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(II)I- intermediary - method_48116- Lnet/minecraft/class_3532;method_48116(II)I- named - floorDiv- Lnet/minecraft/util/math/MathHelper;floorDiv(II)I
 
- 
nextIntReturns a random, uniformly distributed integer value in[min, max]. If the range is empty (i.e.max < min), it returnsmin.- Parameters:
- min- the minimum value, inclusive
- max- the maximum value, inclusive
- Returns:
- a random, uniformly distributed integer value in [min, max]
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Lapf;II)I- intermediary - method_15395- Lnet/minecraft/class_3532;method_15395(Lnet/minecraft/class_5819;II)I- named - nextInt- Lnet/minecraft/util/math/MathHelper;nextInt(Lnet/minecraft/util/math/random/Random;II)I
 
- 
nextFloat- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Lapf;FF)F- intermediary - method_15344- Lnet/minecraft/class_3532;method_15344(Lnet/minecraft/class_5819;FF)F- named - nextFloat- Lnet/minecraft/util/math/MathHelper;nextFloat(Lnet/minecraft/util/math/random/Random;FF)F
 
- 
nextDouble- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Lapf;DD)D- intermediary - method_15366- Lnet/minecraft/class_3532;method_15366(Lnet/minecraft/class_5819;DD)D- named - nextDouble- Lnet/minecraft/util/math/MathHelper;nextDouble(Lnet/minecraft/util/math/random/Random;DD)D
 
- 
approximatelyEqualspublic static boolean approximatelyEquals(float a, float b) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(FF)Z- intermediary - method_15347- Lnet/minecraft/class_3532;method_15347(FF)Z- named - approximatelyEquals- Lnet/minecraft/util/math/MathHelper;approximatelyEquals(FF)Z
 
- 
approximatelyEqualspublic static boolean approximatelyEquals(double a, double b) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(DD)Z- intermediary - method_20390- Lnet/minecraft/class_3532;method_20390(DD)Z- named - approximatelyEquals- Lnet/minecraft/util/math/MathHelper;approximatelyEquals(DD)Z
 
- 
floorModpublic static int floorMod(int dividend, int divisor) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(II)I- intermediary - method_15387- Lnet/minecraft/class_3532;method_15387(II)I- named - floorMod- Lnet/minecraft/util/math/MathHelper;floorMod(II)I
 
- 
floorModpublic static float floorMod(float dividend, float divisor) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(FF)F- intermediary - method_15341- Lnet/minecraft/class_3532;method_15341(FF)F- named - floorMod- Lnet/minecraft/util/math/MathHelper;floorMod(FF)F
 
- 
floorModpublic static double floorMod(double dividend, double divisor) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(DD)D- intermediary - method_15367- Lnet/minecraft/class_3532;method_15367(DD)D- named - floorMod- Lnet/minecraft/util/math/MathHelper;floorMod(DD)D
 
- 
isMultipleOfpublic static boolean isMultipleOf(int a, int b) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(II)Z- intermediary - method_48117- Lnet/minecraft/class_3532;method_48117(II)Z- named - isMultipleOf- Lnet/minecraft/util/math/MathHelper;isMultipleOf(II)Z
 
- 
wrapDegreespublic static int wrapDegrees(int degrees) Wraps an angle in degrees to the interval[-180, 180).- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(I)I- intermediary - method_15392- Lnet/minecraft/class_3532;method_15392(I)I- named - wrapDegrees- Lnet/minecraft/util/math/MathHelper;wrapDegrees(I)I
 
- 
wrapDegreespublic static float wrapDegrees(float degrees) Wraps an angle in degrees to the interval[-180, 180).- Mappings:
- Namespace - Name - Mixin selector - official - g- Lapa;g(F)F- intermediary - method_15393- Lnet/minecraft/class_3532;method_15393(F)F- named - wrapDegrees- Lnet/minecraft/util/math/MathHelper;wrapDegrees(F)F
 
- 
wrapDegreespublic static double wrapDegrees(double degrees) Wraps an angle in degrees to the interval[-180, 180).- Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(D)D- intermediary - method_15338- Lnet/minecraft/class_3532;method_15338(D)D- named - wrapDegrees- Lnet/minecraft/util/math/MathHelper;wrapDegrees(D)D
 
- 
subtractAnglespublic static float subtractAngles(float start, float end) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(FF)F- intermediary - method_15381- Lnet/minecraft/class_3532;method_15381(FF)F- named - subtractAngles- Lnet/minecraft/util/math/MathHelper;subtractAngles(FF)F
 
- 
angleBetweenpublic static float angleBetween(float first, float second) - Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(FF)F- intermediary - method_15356- Lnet/minecraft/class_3532;method_15356(FF)F- named - angleBetween- Lnet/minecraft/util/math/MathHelper;angleBetween(FF)F
 
- 
clampAnglepublic static float clampAngle(float value, float mean, float delta) Clampsvalue, as an angle, betweenmean - deltaandmean + deltadegrees.- Parameters:
- value- the value to clamp
- mean- the mean value of the clamp angle range
- delta- the maximum difference allowed from the mean, must not be negative
- Returns:
- the clamped value
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(FFF)F- intermediary - method_20306- Lnet/minecraft/class_3532;method_20306(FFF)F- named - clampAngle- Lnet/minecraft/util/math/MathHelper;clampAngle(FFF)F
 
- 
stepTowardspublic static float stepTowards(float from, float to, float step) Steps fromfromtowardsto, changing the value by at moststep.- Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(FFF)F- intermediary - method_15348- Lnet/minecraft/class_3532;method_15348(FFF)F- named - stepTowards- Lnet/minecraft/util/math/MathHelper;stepTowards(FFF)F
 
- 
stepUnwrappedAngleTowardspublic static float stepUnwrappedAngleTowards(float from, float to, float step) Steps fromfromdegrees towardstodegrees, changing the value by at moststepdegrees.- Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(FFF)F- intermediary - method_15388- Lnet/minecraft/class_3532;method_15388(FFF)F- named - stepUnwrappedAngleTowards- Lnet/minecraft/util/math/MathHelper;stepUnwrappedAngleTowards(FFF)F
 
- 
parseInt- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Ljava/lang/String;I)I- intermediary - method_15343- Lnet/minecraft/class_3532;method_15343(Ljava/lang/String;I)I- named - parseInt- Lnet/minecraft/util/math/MathHelper;parseInt(Ljava/lang/String;I)I
 
- 
smallestEncompassingPowerOfTwopublic static int smallestEncompassingPowerOfTwo(int value) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(I)I- intermediary - method_15339- Lnet/minecraft/class_3532;method_15339(I)I- named - smallestEncompassingPowerOfTwo- Lnet/minecraft/util/math/MathHelper;smallestEncompassingPowerOfTwo(I)I
 
- 
isPowerOfTwopublic static boolean isPowerOfTwo(int value) - Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(I)Z- intermediary - method_15352- Lnet/minecraft/class_3532;method_15352(I)Z- named - isPowerOfTwo- Lnet/minecraft/util/math/MathHelper;isPowerOfTwo(I)Z
 
- 
ceilLog2public static int ceilLog2(int value) Returns ceil(log2(value)).The vanilla implementation uses the de Bruijn sequence. - Parameters:
- value- the input value
- Returns:
- ceil(log2(value))
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(I)I- intermediary - method_15342- Lnet/minecraft/class_3532;method_15342(I)I- named - ceilLog2- Lnet/minecraft/util/math/MathHelper;ceilLog2(I)I
 
- 
floorLog2public static int floorLog2(int value) Returns floor(log2(value)).The vanilla implementation uses the de Bruijn sequence. - Parameters:
- value- the input value
- Returns:
- floor(log2(value))
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(I)I- intermediary - method_15351- Lnet/minecraft/class_3532;method_15351(I)I- named - floorLog2- Lnet/minecraft/util/math/MathHelper;floorLog2(I)I
 
- 
packRgbpublic static int packRgb(float r, float g, float b) - Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(FFF)I- intermediary - method_15353- Lnet/minecraft/class_3532;method_15353(FFF)I- named - packRgb- Lnet/minecraft/util/math/MathHelper;packRgb(FFF)I
 
- 
fractionalPartpublic static float fractionalPart(float value) - Mappings:
- Namespace - Name - Mixin selector - official - h- Lapa;h(F)F- intermediary - method_22450- Lnet/minecraft/class_3532;method_22450(F)F- named - fractionalPart- Lnet/minecraft/util/math/MathHelper;fractionalPart(F)F
 
- 
fractionalPartpublic static double fractionalPart(double value) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(D)D- intermediary - method_15385- Lnet/minecraft/class_3532;method_15385(D)D- named - fractionalPart- Lnet/minecraft/util/math/MathHelper;fractionalPart(D)D
 
- 
hashCodeDeprecated.- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Lhz;)J- intermediary - method_15389- Lnet/minecraft/class_3532;method_15389(Lnet/minecraft/class_2382;)J- named - hashCode- Lnet/minecraft/util/math/MathHelper;hashCode(Lnet/minecraft/util/math/Vec3i;)J
 
- 
hashCodeDeprecated.- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(III)J- intermediary - method_15371- Lnet/minecraft/class_3532;method_15371(III)J- named - hashCode- Lnet/minecraft/util/math/MathHelper;hashCode(III)J
 
- 
randomUuid- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Lapf;)Ljava/util/UUID;- intermediary - method_15378- Lnet/minecraft/class_3532;method_15378(Lnet/minecraft/class_5819;)Ljava/util/UUID;- named - randomUuid- Lnet/minecraft/util/math/MathHelper;randomUuid(Lnet/minecraft/util/math/random/Random;)Ljava/util/UUID;
 
- 
randomUuid- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a()Ljava/util/UUID;- intermediary - method_15394- Lnet/minecraft/class_3532;method_15394()Ljava/util/UUID;- named - randomUuid- Lnet/minecraft/util/math/MathHelper;randomUuid()Ljava/util/UUID;
 
- 
getLerpProgresspublic static double getLerpProgress(double value, double start, double end) Gets the fraction of the way thatvalueis betweenstartandend. This is the delta value needed to lerp betweenstartandendto getvalue. In other words,getLerpProgress(lerp(delta, start, end), start, end) == delta.- Parameters:
- value- the result of the lerp function
- start- the value interpolated from
- end- the value interpolated to
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(DDD)D- intermediary - method_15370- Lnet/minecraft/class_3532;method_15370(DDD)D- named - getLerpProgress- Lnet/minecraft/util/math/MathHelper;getLerpProgress(DDD)D
 
- 
getLerpProgresspublic static float getLerpProgress(float value, float start, float end) - Mappings:
- Namespace - Name - Mixin selector - official - g- Lapa;g(FFF)F- intermediary - method_37960- Lnet/minecraft/class_3532;method_37960(FFF)F- named - getLerpProgress- Lnet/minecraft/util/math/MathHelper;getLerpProgress(FFF)F
 
- 
method_34945- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(Leei;Leei;Leed;)Z- intermediary - method_34945- Lnet/minecraft/class_3532;method_34945(Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_238;)Z- named - method_34945- Lnet/minecraft/util/math/MathHelper;method_34945(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;)Z
 
- 
atan2public static double atan2(double y, double x) Returns an approximation ofMath.atan2(y, x).- Returns:
- an approximation of Math.atan2(y, x)
- Implementation Note:
- This implementation transforms the arguments such that they
 lie in the first quadrant. If y > x, thenxandyare swapped to minimize the error of the initial approximation.xandyare normalized, and an initial approximation of the result and the sine of the deviation from the true value are obtained using theARCSINE_TABLEandCOSINE_OF_ARCSINE_TABLElookup tables. The error itself is approximated using the third-order Maclaurin series polynomial for arcsin. Finally, the implementation undoes any transformations that were performed initially.
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(DD)D- intermediary - method_15349- Lnet/minecraft/class_3532;method_15349(DD)D- named - atan2- Lnet/minecraft/util/math/MathHelper;atan2(DD)D
 
- 
inverseSqrtpublic static float inverseSqrt(float x) - Mappings:
- Namespace - Name - Mixin selector - official - i- Lapa;i(F)F- intermediary - method_48119- Lnet/minecraft/class_3532;method_48119(F)F- named - inverseSqrt- Lnet/minecraft/util/math/MathHelper;inverseSqrt(F)F
 
- 
inverseSqrtpublic static double inverseSqrt(double x) - Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(D)D- intermediary - method_48118- Lnet/minecraft/class_3532;method_48118(D)D- named - inverseSqrt- Lnet/minecraft/util/math/MathHelper;inverseSqrt(D)D
 
- 
fastInverseSqrtDeprecated.Returns an approximation of1 / Math.sqrt(x).- Returns:
- an approximation of 1 / Math.sqrt(x)
- Mappings:
- Namespace - Name - Mixin selector - official - g- Lapa;g(D)D- intermediary - method_15345- Lnet/minecraft/class_3532;method_15345(D)D- named - fastInverseSqrt- Lnet/minecraft/util/math/MathHelper;fastInverseSqrt(D)D
 
- 
fastInverseCbrtpublic static float fastInverseCbrt(float x) Returns an approximation of1 / Math.cbrt(x).- Returns:
- an approximation of 1 / Math.cbrt(x)
- Mappings:
- Namespace - Name - Mixin selector - official - j- Lapa;j(F)F- intermediary - method_23278- Lnet/minecraft/class_3532;method_23278(F)F- named - fastInverseCbrt- Lnet/minecraft/util/math/MathHelper;fastInverseCbrt(F)F
 
- 
hsvToRgbpublic static int hsvToRgb(float hue, float saturation, float value) - Mappings:
- Namespace - Name - Mixin selector - official - h- Lapa;h(FFF)I- intermediary - method_15369- Lnet/minecraft/class_3532;method_15369(FFF)I- named - hsvToRgb- Lnet/minecraft/util/math/MathHelper;hsvToRgb(FFF)I
 
- 
idealHashpublic static int idealHash(int value) - Mappings:
- Namespace - Name - Mixin selector - official - g- Lapa;g(I)I- intermediary - method_15354- Lnet/minecraft/class_3532;method_15354(I)I- named - idealHash- Lnet/minecraft/util/math/MathHelper;idealHash(I)I
 
- 
binarySearchFinds the minimum value in[min, max)that satisfies the monotonicpredicate.The predicatemust be monotonic, i.e. if for anya,predicate.test(a)istrue, then for allb > a,predicate.test(b)must also betrue.Examples: - binarySearch(3, 7, x -> true)returns- 3.
- binarySearch(3, 7, x -> x >= 5)returns- 5.
- binarySearch(3, 7, x -> false)returns- 7.
 - Parameters:
- min- the minimum value (inclusive) to be tested
- max- the maximum value (exclusive) to be tested
- predicate- the predicate that returns- truefor integers greater than or equal to the value to be searched for
- Returns:
- the minimum value if such value is found, otherwise max
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(IILjava/util/function/IntPredicate;)I- intermediary - method_15360- Lnet/minecraft/class_3532;method_15360(IILjava/util/function/IntPredicate;)I- named - binarySearch- Lnet/minecraft/util/math/MathHelper;binarySearch(IILjava/util/function/IntPredicate;)I
 
- 
lerppublic static int lerp(float delta, int start, int end) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(FII)I- intermediary - method_48781- Lnet/minecraft/class_3532;method_48781(FII)I- named - lerp- Lnet/minecraft/util/math/MathHelper;lerp(FII)I
 
- 
lerppublic static float lerp(float delta, float start, float end) - Mappings:
- Namespace - Name - Mixin selector - official - i- Lapa;i(FFF)F- intermediary - method_16439- Lnet/minecraft/class_3532;method_16439(FFF)F- named - lerp- Lnet/minecraft/util/math/MathHelper;lerp(FFF)F
 
- 
lerppublic static double lerp(double delta, double start, double end) - Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(DDD)D- intermediary - method_16436- Lnet/minecraft/class_3532;method_16436(DDD)D- named - lerp- Lnet/minecraft/util/math/MathHelper;lerp(DDD)D
 
- 
lerp2public static double lerp2(double deltaX, double deltaY, double x0y0, double x1y0, double x0y1, double x1y1) A two-dimensional lerp between values on the 4 corners of the unit square. Arbitrary values are specified for the corners and the output is interpolated between them.- Parameters:
- deltaX- the x-coordinate on the unit square
- deltaY- the y-coordinate on the unit square
- x0y0- the output if- deltaXis 0 and- deltaYis 0
- x1y0- the output if- deltaXis 1 and- deltaYis 0
- x0y1- the output if- deltaXis 0 and- deltaYis 1
- x1y1- the output if- deltaXis 1 and- deltaYis 1
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DDDDDD)D- intermediary - method_16437- Lnet/minecraft/class_3532;method_16437(DDDDDD)D- named - lerp2- Lnet/minecraft/util/math/MathHelper;lerp2(DDDDDD)D
 
- 
lerp3public static double lerp3(double deltaX, double deltaY, double deltaZ, double x0y0z0, double x1y0z0, double x0y1z0, double x1y1z0, double x0y0z1, double x1y0z1, double x0y1z1, double x1y1z1) A three-dimensional lerp between values on the 8 corners of the unit cube. Arbitrary values are specified for the corners and the output is interpolated between them.- Parameters:
- deltaX- the x-coordinate on the unit cube
- deltaY- the y-coordinate on the unit cube
- deltaZ- the z-coordinate on the unit cube
- x0y0z0- the output if- deltaXis 0,- deltaYis 0 and- deltaZis 0
- x1y0z0- the output if- deltaXis 1,- deltaYis 0 and- deltaZis 0
- x0y1z0- the output if- deltaXis 0,- deltaYis 1 and- deltaZis 0
- x1y1z0- the output if- deltaXis 1,- deltaYis 1 and- deltaZis 0
- x0y0z1- the output if- deltaXis 0,- deltaYis 0 and- deltaZis 1
- x1y0z1- the output if- deltaXis 1,- deltaYis 0 and- deltaZis 1
- x0y1z1- the output if- deltaXis 0,- deltaYis 1 and- deltaZis 1
- x1y1z1- the output if- deltaXis 1,- deltaYis 1 and- deltaZis 1
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DDDDDDDDDDD)D- intermediary - method_16438- Lnet/minecraft/class_3532;method_16438(DDDDDDDDDDD)D- named - lerp3- Lnet/minecraft/util/math/MathHelper;lerp3(DDDDDDDDDDD)D
 
- 
catmullRompublic static float catmullRom(float delta, float p0, float p1, float p2, float p3) Interpolates a point on a Catmull-Rom Spline. This spline has a property that if there are two splines with argumentsp0, p1, p2, p3andp1, p2, p3, p4, the resulting curve will have a continuous first derivative atp2, where the two input curves connect. For higher-dimensional curves, the interpolation on the curve is done component-wise: for inputsdelta, (p0x, p0y), (p1x, p1y), (p2x, p2y), (p3x, p3y), the output is(catmullRom(delta, p0x, p1x, p2x, p3x), catmullRom(delta, p0y, p1y, p2y, p3y)).- Parameters:
- delta- the progress along the interpolation
- p0- the previous data point to assist in curve-smoothing
- p1- the output if- deltais 0
- p2- the output if- deltais 1
- p3- the next data point to assist in curve-smoothing
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(FFFFF)F- intermediary - method_41303- Lnet/minecraft/class_3532;method_41303(FFFFF)F- named - catmullRom- Lnet/minecraft/util/math/MathHelper;catmullRom(FFFFF)F
 
- 
perlinFadepublic static double perlinFade(double value) - Mappings:
- Namespace - Name - Mixin selector - official - h- Lapa;h(D)D- intermediary - method_16435- Lnet/minecraft/class_3532;method_16435(D)D- named - perlinFade- Lnet/minecraft/util/math/MathHelper;perlinFade(D)D
 
- 
perlinFadeDerivativepublic static double perlinFadeDerivative(double value) - Mappings:
- Namespace - Name - Mixin selector - official - i- Lapa;i(D)D- intermediary - method_34956- Lnet/minecraft/class_3532;method_34956(D)D- named - perlinFadeDerivative- Lnet/minecraft/util/math/MathHelper;perlinFadeDerivative(D)D
 
- 
signpublic static int sign(double value) - Mappings:
- Namespace - Name - Mixin selector - official - j- Lapa;j(D)I- intermediary - method_17822- Lnet/minecraft/class_3532;method_17822(D)I- named - sign- Lnet/minecraft/util/math/MathHelper;sign(D)I
 
- 
lerpAngleDegreespublic static float lerpAngleDegrees(float delta, float start, float end) - Mappings:
- Namespace - Name - Mixin selector - official - j- Lapa;j(FFF)F- intermediary - method_17821- Lnet/minecraft/class_3532;method_17821(FFF)F- named - lerpAngleDegrees- Lnet/minecraft/util/math/MathHelper;lerpAngleDegrees(FFF)F
 
- 
wrappublic static float wrap(float value, float maxDeviation) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(FF)F- intermediary - method_24504- Lnet/minecraft/class_3532;method_24504(FF)F- named - wrap- Lnet/minecraft/util/math/MathHelper;wrap(FF)F
 
- 
squarepublic static float square(float n) - Mappings:
- Namespace - Name - Mixin selector - official - k- Lapa;k(F)F- intermediary - method_27285- Lnet/minecraft/class_3532;method_27285(F)F- named - square- Lnet/minecraft/util/math/MathHelper;square(F)F
 
- 
squarepublic static double square(double n) - Mappings:
- Namespace - Name - Mixin selector - official - k- Lapa;k(D)D- intermediary - method_33723- Lnet/minecraft/class_3532;method_33723(D)D- named - square- Lnet/minecraft/util/math/MathHelper;square(D)D
 
- 
squarepublic static int square(int n) - Mappings:
- Namespace - Name - Mixin selector - official - h- Lapa;h(I)I- intermediary - method_34954- Lnet/minecraft/class_3532;method_34954(I)I- named - square- Lnet/minecraft/util/math/MathHelper;square(I)I
 
- 
squarepublic static long square(long n) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(J)J- intermediary - method_38652- Lnet/minecraft/class_3532;method_38652(J)J- named - square- Lnet/minecraft/util/math/MathHelper;square(J)J
 
- 
clampedMappublic static double clampedMap(double value, double oldStart, double oldEnd, double newStart, double newEnd) Linearly maps a value from one number range to another and clamps the result.- Parameters:
- value- the input value
- oldStart- the starting value of the original range
- oldEnd- the end value of the original range
- newStart- the starting value of the new range
- newEnd- the end value of the new range
- Returns:
- the mapped value, clamped between newStartandnewEnd
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DDDDD)D- intermediary - method_32854- Lnet/minecraft/class_3532;method_32854(DDDDD)D- named - clampedMap- Lnet/minecraft/util/math/MathHelper;clampedMap(DDDDD)D
 
- 
clampedMappublic static float clampedMap(float value, float oldStart, float oldEnd, float newStart, float newEnd) Linearly maps a value from one number range to another and clamps the result.- Parameters:
- value- the input value
- oldStart- the starting value of the original range
- oldEnd- the end value of the original range
- newStart- the starting value of the new range
- newEnd- the end value of the new range
- Returns:
- the mapped value, clamped between newStartandnewEnd
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(FFFFF)F- intermediary - method_37958- Lnet/minecraft/class_3532;method_37958(FFFFF)F- named - clampedMap- Lnet/minecraft/util/math/MathHelper;clampedMap(FFFFF)F
 
- 
mappublic static double map(double value, double oldStart, double oldEnd, double newStart, double newEnd) Linearly maps a value from one number range to another, unclamped.For the return value result,getLerpProgress(value, oldStart, oldEnd)is approximately equal togetLerpProgress(result, newStart, newEnd)(accounting for floating point errors).- Parameters:
- value- the input value
- oldStart- the starting value of the original range
- oldEnd- the end value of the original range
- newStart- the starting value of the new range
- newEnd- the end value of the new range
- Returns:
- the mapped value
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(DDDDD)D- intermediary - method_33722- Lnet/minecraft/class_3532;method_33722(DDDDD)D- named - map- Lnet/minecraft/util/math/MathHelper;map(DDDDD)D
 
- 
mappublic static float map(float value, float oldStart, float oldEnd, float newStart, float newEnd) Linearly maps a value from one number range to another, unclamped.For the return value result,getLerpProgress(value, oldStart, oldEnd)is approximately equal togetLerpProgress(result, newStart, newEnd)(accounting for floating point errors).- Parameters:
- value- the input value
- oldStart- the starting value of the original range
- oldEnd- the end value of the original range
- newStart- the starting value of the new range
- newEnd- the end value of the new range
- Returns:
- the mapped value
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(FFFFF)F- intermediary - method_37959- Lnet/minecraft/class_3532;method_37959(FFFFF)F- named - map- Lnet/minecraft/util/math/MathHelper;map(FFFFF)F
 
- 
method_34957public static double method_34957(double double2) - Mappings:
- Namespace - Name - Mixin selector - official - l- Lapa;l(D)D- intermediary - method_34957- Lnet/minecraft/class_3532;method_34957(D)D- named - method_34957- Lnet/minecraft/util/math/MathHelper;method_34957(D)D
 
- 
roundUpToMultiplepublic static int roundUpToMultiple(int value, int divisor) Returns a value farther than or as far asvaluefrom zero that is a multiple ofdivisor.- Mappings:
- Namespace - Name - Mixin selector - official - d- Lapa;d(II)I- intermediary - method_28139- Lnet/minecraft/class_3532;method_28139(II)I- named - roundUpToMultiple- Lnet/minecraft/util/math/MathHelper;roundUpToMultiple(II)I
 
- 
ceilDivpublic static int ceilDiv(int a, int b) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(II)I- intermediary - method_38788- Lnet/minecraft/class_3532;method_38788(II)I- named - ceilDiv- Lnet/minecraft/util/math/MathHelper;ceilDiv(II)I
 
- 
nextBetweenReturns a random, uniformly distributed integer value in[min, max].- Parameters:
- min- the minimum value, inclusive
- max- the maximum value, inclusive
- Returns:
- a random, uniformly distributed integer value in [min, max]
- Throws:
- IllegalArgumentException- if the range is empty (i.e.- max < min)
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(Lapf;II)I- intermediary - method_32751- Lnet/minecraft/class_3532;method_32751(Lnet/minecraft/class_5819;II)I- named - nextBetween- Lnet/minecraft/util/math/MathHelper;nextBetween(Lnet/minecraft/util/math/random/Random;II)I
 
- 
nextBetween- Mappings:
- Namespace - Name - Mixin selector - official - b- Lapa;b(Lapf;FF)F- intermediary - method_32750- Lnet/minecraft/class_3532;method_32750(Lnet/minecraft/class_5819;FF)F- named - nextBetween- Lnet/minecraft/util/math/MathHelper;nextBetween(Lnet/minecraft/util/math/random/Random;FF)F
 
- 
nextGaussian- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(Lapf;FF)F- intermediary - method_32855- Lnet/minecraft/class_3532;method_32855(Lnet/minecraft/class_5819;FF)F- named - nextGaussian- Lnet/minecraft/util/math/MathHelper;nextGaussian(Lnet/minecraft/util/math/random/Random;FF)F
 
- 
squaredHypotpublic static double squaredHypot(double a, double b) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(DD)D- intermediary - method_41189- Lnet/minecraft/class_3532;method_41189(DD)D- named - squaredHypot- Lnet/minecraft/util/math/MathHelper;squaredHypot(DD)D
 
- 
hypotpublic static double hypot(double a, double b) - Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(DD)D- intermediary - method_39241- Lnet/minecraft/class_3532;method_39241(DD)D- named - hypot- Lnet/minecraft/util/math/MathHelper;hypot(DD)D
 
- 
squaredMagnitudepublic static double squaredMagnitude(double a, double b, double c) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lapa;e(DDD)D- intermediary - method_41190- Lnet/minecraft/class_3532;method_41190(DDD)D- named - squaredMagnitude- Lnet/minecraft/util/math/MathHelper;squaredMagnitude(DDD)D
 
- 
magnitudepublic static double magnitude(double a, double b, double c) - Mappings:
- Namespace - Name - Mixin selector - official - f- Lapa;f(DDD)D- intermediary - method_33825- Lnet/minecraft/class_3532;method_33825(DDD)D- named - magnitude- Lnet/minecraft/util/math/MathHelper;magnitude(DDD)D
 
- 
roundDownToMultiplepublic static int roundDownToMultiple(double a, int b) Returnsarounded down to the nearest multiple ofb.- Returns:
- arounded down to the nearest multiple of- b
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(DI)I- intermediary - method_38961- Lnet/minecraft/class_3532;method_38961(DI)I- named - roundDownToMultiple- Lnet/minecraft/util/math/MathHelper;roundDownToMultiple(DI)I
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapa;c(III)Ljava/util/stream/IntStream;- intermediary - method_42120- Lnet/minecraft/class_3532;method_42120(III)Ljava/util/stream/IntStream;- named - stream- Lnet/minecraft/util/math/MathHelper;stream(III)Ljava/util/stream/IntStream;
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - official - a- Lapa;a(IIII)Ljava/util/stream/IntStream;- intermediary - method_42117- Lnet/minecraft/class_3532;method_42117(IIII)Ljava/util/stream/IntStream;- named - stream- Lnet/minecraft/util/math/MathHelper;stream(IIII)Ljava/util/stream/IntStream;
 
 
-