mirror of
https://github.com/apple/pkl.git
synced 2026-03-17 23:03:54 +01:00
logical and fix in mathUtils (#102)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user