net.minecraft.util

public class Mth

bae
net.minecraft.util.Mth
net.minecraft.class_3532
net.minecraft.util.math.MathHelper
net.minecraft.util.MathHelper

Field summary

Modifier and TypeField
private static final long
k
UUID_VERSION
field_29852
field_29852
private static final long
l
UUID_VERSION_TYPE_4
field_29853
HALF_PI_RADIANS_SINE_TABLE_INDEX
private static final long
m
UUID_VARIANT
field_29854
field_29854
private static final long
n
UUID_VARIANT_2
field_29855
field_29855
public static final float
a
PI
field_29844
PI
public static final float
b
HALF_PI
field_29845
HALF_PI
public static final float
c
TWO_PI
field_29846
TAU
public static final float
d
DEG_TO_RAD
field_29847
RADIANS_PER_DEGREE
public static final float
e
RAD_TO_DEG
field_29848
DEGREES_PER_RADIAN
public static final float
f
EPSILON
field_29849
EPSILON
public static final float
g
SQRT_OF_TWO
field_15724
SQUARE_ROOT_OF_TWO
private static final float
o
SIN_SCALE
field_29856
DEGREES_TO_SINE_TABLE_INDEX
public static final org.joml.Vector3f
h
Y_AXIS
field_46242
Y_AXIS
public static final org.joml.Vector3f
i
X_AXIS
field_46243
X_AXIS
public static final org.joml.Vector3f
j
Z_AXIS
field_46244
Z_AXIS
private static final float[]
p
SIN
field_15725
SINE_TABLE
private static final RandomSource
q
RANDOM
field_15726
RANDOM
private static final int[]
r
MULTIPLY_DE_BRUIJN_BIT_POSITION
field_15723
MULTIPLY_DE_BRUIJN_BIT_POSITION
private static final double
s
ONE_SIXTH
field_29857
ARCSINE_MACLAURIN_3
private static final int
t
FRAC_EXP
field_29858
field_29858
private static final int
u
LUT_SIZE
field_29859
ARCSINE_TABLE_LENGTH
private static final double
v
FRAC_BIAS
field_15728
ROUNDER_256THS
private static final double[]
w
ASIN_TAB
field_15727
ARCSINE_TABLE
private static final double[]
x
COS_TAB
field_15722
COSINE_OF_ARCSINE_TABLE

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static float
a(float arg0)
sin(float arg0)
method_15374(float arg0)
sin(float value)
public static float
b(float arg0)
cos(float arg0)
method_15362(float arg0)
cos(float value)
public static float
c(float arg0)
sqrt(float arg0)
method_15355(float arg0)
sqrt(float value)
public static int
d(float arg0)
floor(float arg0)
method_15375(float arg0)
floor(float value)
public static int
a(double arg0)
floor(double arg0)
method_15357(double arg0)
floor(double value)
public static long
b(double arg0)
lfloor(double arg0)
method_15372(double arg0)
lfloor(double value)
public static float
e(float arg0)
abs(float arg0)
method_15379(float arg0)
abs(float value)
public static int
a(int arg0)
abs(int arg0)
method_15382(int arg0)
abs(int value)
public static int
f(float arg0)
ceil(float arg0)
method_15386(float arg0)
ceil(float value)
public static int
c(double arg0)
ceil(double arg0)
method_15384(double arg0)
ceil(double value)
public static int
a(int arg0, int arg1, int arg2)
clamp(int arg0, int arg1, int arg2)
method_15340(int arg0, int arg1, int arg2)
clamp(int value, int min, int max)
public static long
a(long arg0, long arg1, long arg2)
clamp(long arg0, long arg1, long arg2)
method_53062(long arg0, long arg1, long arg2)
clamp(long value, long min, long max)
public static float
a(float arg0, float arg1, float arg2)
clamp(float arg0, float arg1, float arg2)
method_15363(float arg0, float arg1, float arg2)
clamp(float value, float min, float max)
public static double
a(double arg0, double arg1, double arg2)
clamp(double arg0, double arg1, double arg2)
method_15350(double arg0, double arg1, double arg2)
clamp(double value, double min, double max)
public static double
b(double arg0, double arg1, double arg2)
clampedLerp(double arg0, double arg1, double arg2)
method_15390(double arg0, double arg1, double arg2)
clampedLerp(double start, double end, double delta)
public static float
b(float arg0, float arg1, float arg2)
clampedLerp(float arg0, float arg1, float arg2)
method_37166(float arg0, float arg1, float arg2)
clampedLerp(float start, float end, float delta)
public static double
a(double arg0, double arg1)
absMax(double arg0, double arg1)
method_15391(double arg0, double arg1)
absMax(double a, double b)
public static int
a(int arg0, int arg1)
floorDiv(int arg0, int arg1)
method_48116(int arg0, int arg1)
floorDiv(int dividend, int divisor)
public static int
a(bam arg0, int arg1, int arg2)
nextInt(RandomSource arg0, int arg1, int arg2)
method_15395(class_5819 arg0, int arg1, int arg2)
nextInt(Random random, int min, int max)
public static float
a(bam arg0, float arg1, float arg2)
nextFloat(RandomSource arg0, float arg1, float arg2)
method_15344(class_5819 arg0, float arg1, float arg2)
nextFloat(Random random, float min, float max)
public static double
a(bam arg0, double arg1, double arg2)
nextDouble(RandomSource arg0, double arg1, double arg2)
method_15366(class_5819 arg0, double arg1, double arg2)
nextDouble(Random random, double min, double max)
public static boolean
a(float arg0, float arg1)
equal(float arg0, float arg1)
method_15347(float arg0, float arg1)
approximatelyEquals(float a, float b)
public static boolean
b(double arg0, double arg1)
equal(double arg0, double arg1)
method_20390(double arg0, double arg1)
approximatelyEquals(double a, double b)
public static int
b(int arg0, int arg1)
positiveModulo(int arg0, int arg1)
method_15387(int arg0, int arg1)
floorMod(int dividend, int divisor)
public static float
b(float arg0, float arg1)
positiveModulo(float arg0, float arg1)
method_15341(float arg0, float arg1)
floorMod(float dividend, float divisor)
public static double
c(double arg0, double arg1)
positiveModulo(double arg0, double arg1)
method_15367(double arg0, double arg1)
floorMod(double dividend, double divisor)
public static boolean
c(int arg0, int arg1)
isMultipleOf(int arg0, int arg1)
method_48117(int arg0, int arg1)
isMultipleOf(int a, int b)
public static byte
g(float arg0)
packDegrees(float arg0)
method_62995(float arg0)
packDegrees(float degrees)
public static float
a(byte arg0)
unpackDegrees(byte arg0)
method_62994(byte arg0)
unpackDegrees(byte packedDegrees)
public static int
b(int arg0)
wrapDegrees(int arg0)
method_15392(int arg0)
wrapDegrees(int degrees)
public static float
a(long arg0)
wrapDegrees(long arg0)
method_61343(long arg0)
wrapDegrees(long degrees)
public static float
h(float arg0)
wrapDegrees(float arg0)
method_15393(float arg0)
wrapDegrees(float degrees)
public static double
d(double arg0)
wrapDegrees(double arg0)
method_15338(double arg0)
wrapDegrees(double degrees)
public static float
c(float arg0, float arg1)
degreesDifference(float arg0, float arg1)
method_15381(float arg0, float arg1)
subtractAngles(float start, float end)
public static float
d(float arg0, float arg1)
degreesDifferenceAbs(float arg0, float arg1)
method_15356(float arg0, float arg1)
angleBetween(float first, float second)
public static float
c(float arg0, float arg1, float arg2)
rotateIfNecessary(float arg0, float arg1, float arg2)
method_20306(float arg0, float arg1, float arg2)
clampAngle(float value, float mean, float delta)
public static float
d(float arg0, float arg1, float arg2)
approach(float arg0, float arg1, float arg2)
method_15348(float arg0, float arg1, float arg2)
stepTowards(float from, float to, float step)
public static float
e(float arg0, float arg1, float arg2)
approachDegrees(float arg0, float arg1, float arg2)
method_15388(float arg0, float arg1, float arg2)
stepUnwrappedAngleTowards(float from, float to, float step)
public static int
a(String arg0, int arg1)
getInt(String arg0, int arg1)
method_15343(String arg0, int arg1)
parseInt(String string, int fallback)
public static int
c(int arg0)
smallestEncompassingPowerOfTwo(int arg0)
method_15339(int arg0)
smallestEncompassingPowerOfTwo(int value)
public static boolean
d(int arg0)
isPowerOfTwo(int arg0)
method_15352(int arg0)
isPowerOfTwo(int value)
public static int
e(int arg0)
ceillog2(int arg0)
method_15342(int arg0)
ceilLog2(int value)
public static int
f(int arg0)
log2(int arg0)
method_15351(int arg0)
floorLog2(int value)
public static float
i(float arg0)
frac(float arg0)
method_22450(float arg0)
fractionalPart(float value)
public static double
e(double arg0)
frac(double arg0)
method_15385(double arg0)
fractionalPart(double value)
public static long
a(kl arg0)
getSeed(Vec3i arg0)
method_15389(class_2382 arg0)
hashCode(Vec3i vec)
public static long
b(int arg0, int arg1, int arg2)
getSeed(int arg0, int arg1, int arg2)
method_15371(int arg0, int arg1, int arg2)
hashCode(int x, int y, int z)
public static UUID
a(bam arg0)
createInsecureUUID(RandomSource arg0)
method_15378(class_5819 arg0)
randomUuid(Random random)
public static UUID
a()
createInsecureUUID()
method_15394()
randomUuid()
public static double
c(double arg0, double arg1, double arg2)
inverseLerp(double arg0, double arg1, double arg2)
method_15370(double arg0, double arg1, double arg2)
getLerpProgress(double value, double start, double end)
public static float
f(float arg0, float arg1, float arg2)
inverseLerp(float arg0, float arg1, float arg2)
method_37960(float arg0, float arg1, float arg2)
getLerpProgress(float value, float start, float end)
public static boolean
a(fby arg0, fby arg1, fbt arg2)
rayIntersectsAABB(Vec3 arg0, Vec3 arg1, AABB arg2)
method_34945(class_243 arg0, class_243 arg1, class_238 arg2)
method_34945(Vec3d origin, Vec3d direction, Box box)
public static double
d(double arg0, double arg1)
atan2(double arg0, double arg1)
method_15349(double arg0, double arg1)
atan2(double y, double x)
public static float
j(float arg0)
invSqrt(float arg0)
method_48119(float arg0)
inverseSqrt(float x)
public static double
f(double arg0)
invSqrt(double arg0)
method_48118(double arg0)
inverseSqrt(double x)
public static double
g(double arg0)
fastInvSqrt(double arg0)
method_15345(double arg0)
fastInverseSqrt(double x)
public static float
k(float arg0)
fastInvCubeRoot(float arg0)
method_23278(float arg0)
fastInverseCbrt(float x)
public static int
g(float arg0, float arg1, float arg2)
hsvToRgb(float arg0, float arg1, float arg2)
method_15369(float arg0, float arg1, float arg2)
hsvToRgb(float hue, float saturation, float value)
public static int
a(float arg0, float arg1, float arg2, int arg3)
hsvToArgb(float arg0, float arg1, float arg2, int arg3)
method_60599(float arg0, float arg1, float arg2, int arg3)
hsvToArgb(float hue, float saturation, float value, int alpha)
public static int
g(int arg0)
murmurHash3Mixer(int arg0)
method_15354(int arg0)
idealHash(int value)
public static int
a(int arg0, int arg1, IntPredicate arg2)
binarySearch(int arg0, int arg1, IntPredicate arg2)
method_15360(int arg0, int arg1, IntPredicate arg2)
binarySearch(int min, int max, IntPredicate predicate)
public static int
a(float arg0, int arg1, int arg2)
lerpInt(float arg0, int arg1, int arg2)
method_48781(float arg0, int arg1, int arg2)
lerp(float delta, int start, int end)
public static int
b(float arg0, int arg1, int arg2)
lerpDiscrete(float arg0, int arg1, int arg2)
method_53063(float arg0, int arg1, int arg2)
lerpPositive(float delta, int start, int end)
public static float
h(float arg0, float arg1, float arg2)
lerp(float arg0, float arg1, float arg2)
method_16439(float arg0, float arg1, float arg2)
lerp(float delta, float start, float end)
public static Vec3
a(double arg0, fby arg1, fby arg2)
lerp(double arg0, Vec3 arg1, Vec3 arg2)
method_61342(double arg0, class_243 arg1, class_243 arg2)
lerp(double delta, Vec3d start, Vec3d end)
public static double
d(double arg0, double arg1, double arg2)
lerp(double arg0, double arg1, double arg2)
method_16436(double arg0, double arg1, double arg2)
lerp(double delta, double start, double end)
public static double
a(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
lerp2(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
method_16437(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
lerp2(double deltaX, double deltaY, double x0y0, double x1y0, double x0y1, double x1y1)
public static double
a(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9, double arg10)
lerp3(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9, double arg10)
method_16438(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9, double arg10)
lerp3(double deltaX, double deltaY, double deltaZ, double x0y0z0, double x1y0z0, double x0y1z0, double x1y1z0, double x0y0z1, double x1y0z1, double x0y1z1, double x1y1z1)
public static float
a(float arg0, float arg1, float arg2, float arg3, float arg4)
catmullrom(float arg0, float arg1, float arg2, float arg3, float arg4)
method_41303(float arg0, float arg1, float arg2, float arg3, float arg4)
catmullRom(float delta, float p0, float p1, float p2, float p3)
public static double
h(double arg0)
smoothstep(double arg0)
method_16435(double arg0)
perlinFade(double value)
public static double
i(double arg0)
smoothstepDerivative(double arg0)
method_34956(double arg0)
perlinFadeDerivative(double value)
public static int
j(double arg0)
sign(double arg0)
method_17822(double arg0)
sign(double value)
public static float
i(float arg0, float arg1, float arg2)
rotLerp(float arg0, float arg1, float arg2)
method_17821(float arg0, float arg1, float arg2)
lerpAngleDegrees(float delta, float start, float end)
public static double
e(double arg0, double arg1, double arg2)
rotLerp(double arg0, double arg1, double arg2)
method_52468(double arg0, double arg1, double arg2)
lerpAngleDegrees(double delta, double start, double end)
public static float
j(float arg0, float arg1, float arg2)
rotLerpRad(float arg0, float arg1, float arg2)
method_61345(float arg0, float arg1, float arg2)
lerpAngleRadians(float delta, float start, float end)
public static float
e(float arg0, float arg1)
triangleWave(float arg0, float arg1)
method_24504(float arg0, float arg1)
wrap(float value, float maxDeviation)
public static float
l(float arg0)
square(float arg0)
method_27285(float arg0)
square(float n)
public static double
k(double arg0)
square(double arg0)
method_33723(double arg0)
square(double n)
public static int
h(int arg0)
square(int arg0)
method_34954(int arg0)
square(int n)
public static long
b(long arg0)
square(long arg0)
method_38652(long arg0)
square(long n)
public static double
a(double arg0, double arg1, double arg2, double arg3, double arg4)
clampedMap(double arg0, double arg1, double arg2, double arg3, double arg4)
method_32854(double arg0, double arg1, double arg2, double arg3, double arg4)
clampedMap(double value, double oldStart, double oldEnd, double newStart, double newEnd)
public static float
b(float arg0, float arg1, float arg2, float arg3, float arg4)
clampedMap(float arg0, float arg1, float arg2, float arg3, float arg4)
method_37958(float arg0, float arg1, float arg2, float arg3, float arg4)
clampedMap(float value, float oldStart, float oldEnd, float newStart, float newEnd)
public static double
b(double arg0, double arg1, double arg2, double arg3, double arg4)
map(double arg0, double arg1, double arg2, double arg3, double arg4)
method_33722(double arg0, double arg1, double arg2, double arg3, double arg4)
map(double value, double oldStart, double oldEnd, double newStart, double newEnd)
public static float
c(float arg0, float arg1, float arg2, float arg3, float arg4)
map(float arg0, float arg1, float arg2, float arg3, float arg4)
method_37959(float arg0, float arg1, float arg2, float arg3, float arg4)
map(float value, float oldStart, float oldEnd, float newStart, float newEnd)
public static double
l(double arg0)
wobble(double arg0)
method_34957(double arg0)
method_34957(double arg0)
public static int
d(int arg0, int arg1)
roundToward(int arg0, int arg1)
method_28139(int arg0, int arg1)
roundUpToMultiple(int value, int divisor)
public static int
e(int arg0, int arg1)
positiveCeilDiv(int arg0, int arg1)
method_38788(int arg0, int arg1)
ceilDiv(int a, int b)
public static int
b(bam arg0, int arg1, int arg2)
randomBetweenInclusive(RandomSource arg0, int arg1, int arg2)
method_32751(class_5819 arg0, int arg1, int arg2)
nextBetween(Random random, int min, int max)
public static float
b(bam arg0, float arg1, float arg2)
randomBetween(RandomSource arg0, float arg1, float arg2)
method_32750(class_5819 arg0, float arg1, float arg2)
nextBetween(Random random, float min, float max)
public static float
c(bam arg0, float arg1, float arg2)
normal(RandomSource arg0, float arg1, float arg2)
method_32855(class_5819 arg0, float arg1, float arg2)
nextGaussian(Random random, float mean, float deviation)
public static double
e(double arg0, double arg1)
lengthSquared(double arg0, double arg1)
method_41189(double arg0, double arg1)
squaredHypot(double a, double b)
public static double
f(double arg0, double arg1)
length(double arg0, double arg1)
method_39241(double arg0, double arg1)
hypot(double a, double b)
public static float
f(float arg0, float arg1)
length(float arg0, float arg1)
method_61344(float arg0, float arg1)
hypot(float a, float b)
public static double
f(double arg0, double arg1, double arg2)
lengthSquared(double arg0, double arg1, double arg2)
method_41190(double arg0, double arg1, double arg2)
squaredMagnitude(double a, double b, double c)
public static double
g(double arg0, double arg1, double arg2)
length(double arg0, double arg1, double arg2)
method_33825(double arg0, double arg1, double arg2)
magnitude(double a, double b, double c)
public static float
k(float arg0, float arg1, float arg2)
lengthSquared(float arg0, float arg1, float arg2)
method_60677(float arg0, float arg1, float arg2)
magnitude(float a, float b, float c)
public static int
a(double arg0, int arg1)
quantize(double arg0, int arg1)
method_38961(double arg0, int arg1)
roundDownToMultiple(double a, int b)
public static IntStream
c(int arg0, int arg1, int arg2)
outFromOrigin(int arg0, int arg1, int arg2)
method_42120(int arg0, int arg1, int arg2)
stream(int seed, int lowerBound, int upperBound)
public static IntStream
a(int arg0, int arg1, int arg2, int arg3)
outFromOrigin(int arg0, int arg1, int arg2, int arg3)
method_42117(int arg0, int arg1, int arg2, int arg3)
stream(int seed, int lowerBound, int upperBound, int steps)
public static org.joml.Quaternionf
a(org.joml.Vector3f arg0, org.joml.Quaternionf arg1, org.joml.Quaternionf arg2)
rotationAroundAxis(org.joml.Vector3f arg0, org.joml.Quaternionf arg1, org.joml.Quaternionf arg2)
method_53948(org.joml.Vector3f arg0, org.joml.Quaternionf arg1, org.joml.Quaternionf arg2)
rotateAround(org.joml.Vector3f axis, org.joml.Quaternionf rotation, org.joml.Quaternionf result)
public static int
a(org.apache.commons.lang3.math.Fraction arg0, int arg1)
mulAndTruncate(org.apache.commons.lang3.math.Fraction arg0, int arg1)
method_59515(org.apache.commons.lang3.math.Fraction arg0, int arg1)
multiplyFraction(org.apache.commons.lang3.math.Fraction fraction, int multiplier)
public static float
m(float arg0)
easeInOutSine(float arg0)
method_61346(float arg0)
easeInOutSine(float value)