CLASS net/minecraft/class_3532 net/minecraft/util/math/MathHelper FIELD field_15722 COSINE_TABLE [D FIELD field_15723 MULTIPLY_DE_BRUIJN_BIT_POSITION [I FIELD field_15724 SQUARE_ROOT_OF_TWO F FIELD field_15725 SINE_TABLE [F FIELD field_15726 RANDOM Lnet/minecraft/class_5819; FIELD field_15727 ARCSINE_TABLE [D FIELD field_15728 SMALLEST_FRACTION_FREE_DOUBLE D FIELD field_29844 PI F FIELD field_29845 HALF_PI F FIELD field_29846 TAU F COMMENT Tau is equal to {@code 2 * PI}. FIELD field_29847 RADIANS_PER_DEGREE F FIELD field_29848 DEGREES_PER_RADIAN F FIELD field_29849 EPSILON F FIELD field_29853 HALF_PI_RADIANS_SINE_TABLE_INDEX J FIELD field_29856 DEGREES_TO_SINE_TABLE_INDEX F METHOD method_15338 wrapDegrees (D)D COMMENT Wraps an angle in degrees to the interval {@code [-180, 180)}. ARG 0 degrees METHOD method_15339 smallestEncompassingPowerOfTwo (I)I ARG 0 value METHOD method_15340 clamp (III)I ARG 0 value ARG 1 min ARG 2 max METHOD method_15341 floorMod (FF)F ARG 0 dividend ARG 1 divisor METHOD method_15342 ceilLog2 (I)I COMMENT {@return ceil(log2({@code value}))} COMMENT COMMENT
The vanilla implementation uses the de Bruijn sequence. COMMENT COMMENT @see Integer#numberOfLeadingZeros(int) ARG 0 value COMMENT the input value METHOD method_15343 parseInt (Ljava/lang/String;I)I ARG 0 string ARG 1 fallback METHOD method_15344 nextFloat (Lnet/minecraft/class_5819;FF)F ARG 0 random ARG 1 min ARG 2 max METHOD method_15345 fastInverseSqrt (D)D COMMENT {@return an approximation of {@code 1 / Math.sqrt(x)}} ARG 0 x METHOD method_15346 floorDiv (II)I ARG 0 dividend ARG 1 divisor METHOD method_15347 approximatelyEquals (FF)Z ARG 0 a ARG 1 b METHOD method_15348 stepTowards (FFF)F COMMENT Steps from {@code from} towards {@code to}, changing the value by at most {@code step}. ARG 0 from ARG 1 to ARG 2 step METHOD method_15349 atan2 (DD)D ARG 0 y ARG 2 x METHOD method_15350 clamp (DDD)D ARG 0 value ARG 2 min ARG 4 max METHOD method_15351 floorLog2 (I)I COMMENT {@return floor(log2({@code value}))} COMMENT COMMENT
The vanilla implementation uses the de Bruijn sequence. COMMENT COMMENT @see Integer#numberOfLeadingZeros(int) ARG 0 value COMMENT the input value METHOD method_15352 isPowerOfTwo (I)Z ARG 0 value METHOD method_15353 packRgb (FFF)I ARG 0 r ARG 1 g ARG 2 b METHOD method_15354 idealHash (I)I ARG 0 value METHOD method_15355 sqrt (F)F ARG 0 value METHOD method_15356 angleBetween (FF)F ARG 0 first ARG 1 second METHOD method_15357 floor (D)I ARG 0 value METHOD method_15360 binarySearch (IILjava/util/function/IntPredicate;)I COMMENT Finds the minimum value in {@code [min, max)} that satisfies the COMMENT monotonic {@code predicate}. COMMENT COMMENT
The {@code predicate} must be monotonic, i.e. if for any {@code a}, COMMENT {@code predicate.test(a)} is {@code true}, then for all {@code b > a}, COMMENT {@code predicate.test(b)} must also be {@code true}. COMMENT COMMENT
Examples: COMMENT
For the return value {@code result}, {@code getLerpProgress(value, oldStart, oldEnd)} COMMENT is approximately equal to {@code getLerpProgress(result, newStart, newEnd)} COMMENT (accounting for floating point errors). COMMENT COMMENT @return the mapped value ARG 0 value COMMENT the input value ARG 2 oldStart COMMENT the starting value of the original range ARG 4 oldEnd COMMENT the end value of the original range ARG 6 newStart COMMENT the starting value of the new range ARG 8 newEnd COMMENT the end value of the new range METHOD method_33723 square (D)D ARG 0 n METHOD method_33825 magnitude (DDD)D ARG 0 a ARG 2 b ARG 4 c METHOD method_34939 clamp (BBB)B ARG 0 value ARG 1 min ARG 2 max METHOD method_34943 multiplyColors (IFFF)I ARG 0 color ARG 1 r ARG 2 g ARG 3 b METHOD method_34944 murmurHash (J)J ARG 0 value METHOD method_34947 parseDouble (Ljava/lang/String;D)D ARG 0 string ARG 1 fallback METHOD method_34948 parseDouble (Ljava/lang/String;DD)D COMMENT {@return the parsed double; {@code fallback} if {@code string} is not an COMMENT double; or {@code min} if the parsed double is too small} ARG 0 string COMMENT the string to parse ARG 1 fallback COMMENT the fallback for unparsable {@code string} ARG 3 min COMMENT the minimum if the parsed value is too small METHOD method_34949 parseInt (Ljava/lang/String;II)I COMMENT {@return the parsed integer; {@code fallback} if {@code string} is not an COMMENT integer; or {@code min} if the parsed integer is too small} ARG 0 string COMMENT the string to parse ARG 1 fallback COMMENT the fallback for unparsable {@code string} ARG 2 min COMMENT the minimum if the parsed value is too small METHOD method_34951 getCumulativeDistribution ([D)[D ARG 0 values METHOD method_34952 multiplyColors (II)I ARG 0 a ARG 1 b METHOD method_34953 absFloor (D)I ARG 0 value METHOD method_34954 square (I)I ARG 0 n METHOD method_34956 perlinFadeDerivative (D)D ARG 0 value METHOD method_37166 clampedLerp (FFF)F ARG 0 start ARG 1 end ARG 2 delta METHOD method_37958 clampedMap (FFFFF)F COMMENT Linearly maps a value from one number range to another COMMENT and clamps the result. COMMENT COMMENT @return the mapped value, clamped between {@code newStart} and {@code newEnd} COMMENT @see #map(float, float, float, float, float) the unclamped variant ARG 0 value COMMENT the input value ARG 1 oldStart COMMENT the starting value of the original range ARG 2 oldEnd COMMENT the end value of the original range ARG 3 newStart COMMENT the starting value of the new range ARG 4 newEnd COMMENT the end value of the new range METHOD method_37959 map (FFFFF)F COMMENT Linearly maps a value from one number range to another, unclamped. COMMENT COMMENT
For the return value {@code result}, {@code getLerpProgress(value, oldStart, oldEnd)} COMMENT is approximately equal to {@code getLerpProgress(result, newStart, newEnd)} COMMENT (accounting for floating point errors). COMMENT COMMENT @return the mapped value ARG 0 value COMMENT the input value ARG 1 oldStart COMMENT the starting value of the original range ARG 2 oldEnd COMMENT the end value of the original range ARG 3 newStart COMMENT the starting value of the new range ARG 4 newEnd COMMENT the end value of the new range METHOD method_37960 getLerpProgress (FFF)F ARG 0 value ARG 1 start ARG 2 end METHOD method_38652 square (J)J ARG 0 n METHOD method_38788 ceilDiv (II)I ARG 0 a ARG 1 b METHOD method_38961 roundDownToMultiple (DI)I COMMENT {@return {@code a} rounded down to the nearest multiple of {@code b}} ARG 0 a ARG 2 b METHOD method_39241 hypot (DD)D ARG 0 a ARG 2 b METHOD method_41189 squaredHypot (DD)D ARG 0 a ARG 2 b METHOD method_41190 squaredMagnitude (DDD)D ARG 0 a ARG 2 b ARG 4 c METHOD method_41303 catmullRom (FFFFF)F COMMENT Interpolates a point on a Catmull-Rom Spline. This spline has a property that if there are two COMMENT splines with arguments {@code p0, p1, p2, p3} and {@code p1, p2, p3, p4}, the resulting curve COMMENT will have a continuous first derivative at {@code p2}, where the two input curves connect. For COMMENT higher-dimensional curves, the interpolation on the curve is done component-wise: for COMMENT inputs {@code delta, (p0x, p0y), (p1x, p1y), (p2x, p2y), (p3x, p3y)}, the output is COMMENT {@code (catmullRom(delta, p0x, p1x, p2x, p3x), catmullRom(delta, p0y, p1y, p2y, p3y))}. COMMENT COMMENT @see Cubic Hermite spline (Catmull–Rom spline) ARG 0 delta COMMENT the progress along the interpolation ARG 1 p0 COMMENT the previous data point to assist in curve-smoothing ARG 2 p1 COMMENT the output if {@code delta} is 0 ARG 3 p2 COMMENT the output if {@code delta} is 1 ARG 4 p3 COMMENT the next data point to assist in curve-smoothing METHOD method_42117 stream (IIII)Ljava/util/stream/IntStream; ARG 0 seed ARG 1 lowerBound ARG 2 upperBound ARG 3 steps METHOD method_42118 (IIIII)I ARG 4 i METHOD method_42119 (IIII)Z ARG 3 i METHOD method_42120 stream (III)Ljava/util/stream/IntStream; ARG 0 seed ARG 1 lowerBound ARG 2 upperBound METHOD method_42626 magnitude (F)F ARG 0 n