RogueLife/src/util.h

16 lines
361 B
C
Raw Normal View History

2021-06-15 17:27:30 +02:00
//---
// util: General utilities (what a surprise huh?)
//---
#pragma once
#include <stddef.h>
#include <stdint.h>
/* Like qsort(), but actually it's a heap sort. */
void heap_sort(void *base, size_t n, size_t elsize,
int (*compare)(void const *, void const *));
/* Integer square root (recursive, logarithmic complexity). */
int64_t sqrtll(int64_t n);