2022-06-25 00:23:03 +08:00

3 lines
63 B
JavaScript

export function isPow2(v) {
return !(v & (v - 1)) && (!!v);
}