blob: 0321d0c9c6e132105b6222ed0227cb7add57820d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#pragma once
#include <stdbool.h>
#include <stdint.h>
/// Check if number is a power of two
static inline bool is_power_of_two(uint64_t x)
{
return x != 0 && ((x & (x - 1)) == 0);
}
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "math.h.generated.h"
#endif
|