0123456789101112
|
// Copyright (C) 2024, Jakob Wakeling
// All rights reserved.
#ifndef LIBDRAW_UTIL_UTIL_H_9VY05T8I
#define LIBDRAW_UTIL_UTIL_H_9VY05T8I
#define MIN(a, b) ((a < b) ? a : b)
#define MAX(a, b) ((a > b) ? a : b)
#define CLAMP(x, a, b) (MIN(MAX(x, a), b))
#define IS_CLAMPED(x, a, b) ((x) >= (a) && (x) <= (b))
#endif // LIBDRAW_UTIL_UTIL_H_9VY05T8I
|