Renderer/src/main/c/includes/fluid/utilities.h
austin acfd28a0fc
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
more native refactoring
2024-12-03 12:55:26 -05:00

12 lines
319 B
C

#include <stdint.h>
#ifndef UTILITIES_H
#define UTILITIES_H
#define SWAP(x0,x) {float *tmp=x0;x0=x;x=tmp;}
#define IX(i,j,k) ((i)+(N)*(j)+(N*N)*(k))
#define CK(m,n,o) ((m)+(n)*(3)+(o)*(3)*(3))
#define GET_ARR_RAW(src,i) src[i]
#define ARR_EXISTS(chunk_mask,m,n,o) (chunk_mask & CHUNK_INDEX_ARR[CK(m,n,o)]) > 0
#endif