mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 21:45:52 +01:00
the comment was using single-line comments, I prefer multi-line comments now. This bothered me for much too long.
9 lines
374 B
C
9 lines
374 B
C
/* Copyright (c) 2025 Quinn
|
|
* Licensed under the MIT Licence. See LICENSE for details */
|
|
#pragma once
|
|
|
|
/* Acquires the next power of two of value `x`.
|
|
* Automatically determines the type (and therefore the width) of `x`.
|
|
* Explicitly cast `x` to a desired width, if necessary. */
|
|
#define bit_ceil(x) (1 << (sizeof(__typeof__(x)) * 8 - __builtin_clzg(((x) - !!(x)) | 1)))
|