#ifndef UTILS_H
#define UTILS_H

#include "aliases.h"
#define swap(T, v0, v1)                                                        \
  do {                                                                         \
    T tmp = v0;                                                                \
    v0 = v1;                                                                   \
    v1 = tmp;                                                                  \
  } while (0)

#define min(a, b) (a <= b ? a : b)
#define max(a, b) (a >= b ? a : b)
#define clamp(val, minimum, maximum) (min(maximum, max(minimum, val)))

i64 absolute(i64 value);

#endif // UTILS_H
