Files
rr3-apk/decompiled-community/sources/kotlin/ranges/RangesKt___RangesKt.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

61 lines
1.9 KiB
Java

package kotlin.ranges;
import java.util.NoSuchElementException;
import kotlin.jvm.internal.Intrinsics;
import kotlin.random.Random;
import kotlin.random.RandomKt;
/* loaded from: classes5.dex */
public abstract class RangesKt___RangesKt extends RangesKt__RangesKt {
public static int coerceAtLeast(int i, int i2) {
return i < i2 ? i2 : i;
}
public static long coerceAtLeast(long j, long j2) {
return j < j2 ? j2 : j;
}
public static int coerceAtMost(int i, int i2) {
return i > i2 ? i2 : i;
}
public static long coerceAtMost(long j, long j2) {
return j > j2 ? j2 : j;
}
public static int random(IntRange intRange, Random random) {
Intrinsics.checkNotNullParameter(intRange, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
try {
return RandomKt.nextInt(random, intRange);
} catch (IllegalArgumentException e) {
throw new NoSuchElementException(e.getMessage());
}
}
public static IntProgression downTo(int i, int i2) {
return IntProgression.Companion.fromClosedRange(i, i2, -1);
}
public static IntRange until(int i, int i2) {
if (i2 <= Integer.MIN_VALUE) {
return IntRange.Companion.getEMPTY();
}
return new IntRange(i, i2 - 1);
}
public static int coerceIn(int i, int i2, int i3) {
if (i2 <= i3) {
return i < i2 ? i2 : i > i3 ? i3 : i;
}
throw new IllegalArgumentException("Cannot coerce value to an empty range: maximum " + i3 + " is less than minimum " + i2 + '.');
}
public static long coerceIn(long j, long j2, long j3) {
if (j2 <= j3) {
return j < j2 ? j2 : j > j3 ? j3 : j;
}
throw new IllegalArgumentException("Cannot coerce value to an empty range: maximum " + j3 + " is less than minimum " + j2 + '.');
}
}