mirror of
https://git.sr.ht/~lattis/muon
synced 2026-01-27 09:54:50 +00:00
23 lines
358 B
C
23 lines
358 B
C
/*
|
|
* SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
*/
|
|
|
|
#ifndef MUON_UTIL_H
|
|
#define MUON_UTIL_H
|
|
|
|
#ifdef MIN
|
|
#undef MIN
|
|
#endif
|
|
|
|
#ifdef MAX
|
|
#undef MAX
|
|
#endif
|
|
|
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
|
|
#define IS_POWER_OF_TWO(__i) ((__i & (__i - 1)) == 0)
|
|
|
|
#endif
|