Package net.minecraft.util.math
Class Divider
java.lang.Object
net.minecraft.util.math.Divider
- All Implemented Interfaces:
IntIterator
,Iterator<Integer>
,PrimitiveIterator<Integer,
,IntConsumer> PrimitiveIterator.OfInt
A class for dividing an integer into
divisor
number of integers
such that the difference between any integers is 0
or 1
.
The resulting integers sum to the dividend
.
For example, new Divider(13, 5)
will produce 2, 3, 2, 3, 3
.- Mappings:
Namespace Name named net/minecraft/util/math/Divider
intermediary net/minecraft/class_7836
official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
private final int
private int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasIterable
(int dividend, int divisor) boolean
hasNext()
int
nextInt()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator
forEachRemaining, forEachRemaining, next, skip
Methods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining
-
Field Details
-
divisor
private final int divisor- Mappings:
Namespace Name Mixin selector named divisor
Lnet/minecraft/util/math/Divider;divisor:I
intermediary field_40738
Lnet/minecraft/class_7836;field_40738:I
official a
Lc;a:I
-
quotient
private final int quotient- Mappings:
Namespace Name Mixin selector named quotient
Lnet/minecraft/util/math/Divider;quotient:I
intermediary field_40739
Lnet/minecraft/class_7836;field_40739:I
official b
Lc;b:I
-
mod
private final int mod- Mappings:
Namespace Name Mixin selector named mod
Lnet/minecraft/util/math/Divider;mod:I
intermediary field_40740
Lnet/minecraft/class_7836;field_40740:I
official c
Lc;c:I
-
returnedCount
private int returnedCount- Mappings:
Namespace Name Mixin selector named returnedCount
Lnet/minecraft/util/math/Divider;returnedCount:I
intermediary field_40741
Lnet/minecraft/class_7836;field_40741:I
official d
Lc;d:I
-
remainder
private int remainder- Mappings:
Namespace Name Mixin selector named remainder
Lnet/minecraft/util/math/Divider;remainder:I
intermediary field_40742
Lnet/minecraft/class_7836;field_40742:I
official e
Lc;e:I
-
-
Constructor Details
-
Divider
public Divider(int dividend, int divisor) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/util/math/Divider;<init>(II)V
intermediary <init>
Lnet/minecraft/class_7836;<init>(II)V
official <init>
Lc;<init>(II)V
-
-
Method Details
-
hasNext
public boolean hasNext() -
nextInt
public int nextInt()- Specified by:
nextInt
in interfaceIntIterator
- Specified by:
nextInt
in interfacePrimitiveIterator.OfInt
-
asIterable
- Mappings:
Namespace Name Mixin selector named asIterable
Lnet/minecraft/util/math/Divider;asIterable(II)Ljava/lang/Iterable;
intermediary method_46402
Lnet/minecraft/class_7836;method_46402(II)Ljava/lang/Iterable;
official a
Lc;a(II)Ljava/lang/Iterable;
-