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 official c
intermediary net/minecraft/class_7836
named net/minecraft/util/math/Divider
-
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 official a
Lc;a:I
intermediary field_40738
Lnet/minecraft/class_7836;field_40738:I
named divisor
Lnet/minecraft/util/math/Divider;divisor:I
-
quotient
private final int quotient- Mappings:
Namespace Name Mixin selector official b
Lc;b:I
intermediary field_40739
Lnet/minecraft/class_7836;field_40739:I
named quotient
Lnet/minecraft/util/math/Divider;quotient:I
-
mod
private final int mod- Mappings:
Namespace Name Mixin selector official c
Lc;c:I
intermediary field_40740
Lnet/minecraft/class_7836;field_40740:I
named mod
Lnet/minecraft/util/math/Divider;mod:I
-
returnedCount
private int returnedCount- Mappings:
Namespace Name Mixin selector official d
Lc;d:I
intermediary field_40741
Lnet/minecraft/class_7836;field_40741:I
named returnedCount
Lnet/minecraft/util/math/Divider;returnedCount:I
-
remainder
private int remainder- Mappings:
Namespace Name Mixin selector official e
Lc;e:I
intermediary field_40742
Lnet/minecraft/class_7836;field_40742:I
named remainder
Lnet/minecraft/util/math/Divider;remainder:I
-
-
Constructor Details
-
Divider
public Divider(int dividend, int divisor) - Mappings:
Namespace Name Mixin selector official <init>
Lc;<init>(II)V
intermediary <init>
Lnet/minecraft/class_7836;<init>(II)V
named <init>
Lnet/minecraft/util/math/Divider;<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 official a
Lc;a(II)Ljava/lang/Iterable;
intermediary method_46402
Lnet/minecraft/class_7836;method_46402(II)Ljava/lang/Iterable;
named asIterable
Lnet/minecraft/util/math/Divider;asIterable(II)Ljava/lang/Iterable;
-