math.h (217B)
1 #pragma once 2 3 #include <stdbool.h> 4 #include <stdint.h> 5 6 /// Check if number is a power of two 7 static inline bool is_power_of_two(uint64_t x) 8 { 9 return x != 0 && ((x & (x - 1)) == 0); 10 } 11 12 #include "math.h.generated.h"