logical and fix in mathUtils (#102)

This commit is contained in:
shubham gupta
2024-02-09 10:51:49 +05:30
committed by GitHub
parent 0a3a618091
commit db55c527c6

View File

@@ -63,7 +63,7 @@ public final strictfp class MathUtils {
* Long.bitCount(Long.MIN_VALUE) == 1}, but {@link Long#MIN_VALUE} is not a power of two.
*/
public static boolean isPowerOfTwo(long x) {
return x > 0 & (x & (x - 1)) == 0;
return x > 0 && (x & (x - 1)) == 0;
}
/**