initial commit

This commit is contained in:
Erin Catto 2026-05-10 13:36:52 -07:00
commit 573e1a9fa3
220 changed files with 150440 additions and 0 deletions

21
src/algorithm.h Normal file
View file

@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT
#pragma once
#include <stddef.h>
#ifdef __cplusplus
#define B3_TYPE_OF( A ) decltype( A )
#else
#define B3_TYPE_OF( A ) __typeof__( A )
#endif
#define B3_SWAP( x, y ) \
do \
{ \
B3_TYPE_OF( x ) B3_SWAP_TEMP = x; \
x = y; \
y = B3_SWAP_TEMP; \
} \
while ( 0 )