- 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
43 lines
1.3 KiB
Java
43 lines
1.3 KiB
Java
package kotlin.internal;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class ProgressionUtilKt {
|
|
public static final int mod(int i, int i2) {
|
|
int i3 = i % i2;
|
|
return i3 >= 0 ? i3 : i3 + i2;
|
|
}
|
|
|
|
public static final long mod(long j, long j2) {
|
|
long j3 = j % j2;
|
|
return j3 >= 0 ? j3 : j3 + j2;
|
|
}
|
|
|
|
public static final int differenceModulo(int i, int i2, int i3) {
|
|
return mod(mod(i, i3) - mod(i2, i3), i3);
|
|
}
|
|
|
|
public static final long differenceModulo(long j, long j2, long j3) {
|
|
return mod(mod(j, j3) - mod(j2, j3), j3);
|
|
}
|
|
|
|
public static final int getProgressionLastElement(int i, int i2, int i3) {
|
|
if (i3 > 0) {
|
|
return i >= i2 ? i2 : i2 - differenceModulo(i2, i, i3);
|
|
}
|
|
if (i3 < 0) {
|
|
return i <= i2 ? i2 : i2 + differenceModulo(i, i2, -i3);
|
|
}
|
|
throw new IllegalArgumentException("Step is zero.");
|
|
}
|
|
|
|
public static final long getProgressionLastElement(long j, long j2, long j3) {
|
|
if (j3 > 0) {
|
|
return j >= j2 ? j2 : j2 - differenceModulo(j2, j, j3);
|
|
}
|
|
if (j3 < 0) {
|
|
return j <= j2 ? j2 : j2 + differenceModulo(j, j2, -j3);
|
|
}
|
|
throw new IllegalArgumentException("Step is zero.");
|
|
}
|
|
}
|