mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 02:17:18 +01:00
17 lines
500 B
Java
17 lines
500 B
Java
package io.reactivex.rxjava3.internal.util;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes10.dex */
|
|
public final class Pow2 {
|
|
private Pow2() {
|
|
throw new IllegalStateException("No instances!");
|
|
}
|
|
|
|
public static boolean isPowerOfTwo(int i) {
|
|
return (i & (i + (-1))) == 0;
|
|
}
|
|
|
|
public static int roundToPowerOfTwo(int i) {
|
|
return 1 << (32 - Integer.numberOfLeadingZeros(i - 1));
|
|
}
|
|
}
|