java.lang.Object
io.github.palexdev.virtualizedfx.utils.Utils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.github.palexdev.mfxcore.base.beans.range.IntegerRange
Special instance ofIntegerRange
with bothmin
andmax
set to -1. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.github.palexdev.mfxcore.base.beans.range.IntegerRange
intersection
(io.github.palexdev.mfxcore.base.beans.range.IntegerRange r1, io.github.palexdev.mfxcore.base.beans.range.IntegerRange r2) Finds theIntegerRange
which is the intersection between the two given ranges.
-
Field Details
-
INVALID_RANGE
public static final io.github.palexdev.mfxcore.base.beans.range.IntegerRange INVALID_RANGESpecial instance ofIntegerRange
with bothmin
andmax
set to -1. This value is in fact invalid as indexes.Avoids having to instantiate a new range everytime such values are needed.
-
-
Method Details
-
intersection
public static io.github.palexdev.mfxcore.base.beans.range.IntegerRange intersection(io.github.palexdev.mfxcore.base.beans.range.IntegerRange r1, io.github.palexdev.mfxcore.base.beans.range.IntegerRange r2) Finds theIntegerRange
which is the intersection between the two given ranges.The
min
is given byMath.max(r1Min, r2Min
, while themax
is given byMath.min(r1Max, r2Max
.
-