Files
software_rasterizer/main.h
2022-02-20 20:49:55 +01:00

14 lines
390 B
C

#pragma once
#define ASSERT(x) if(!(x)) *(volatile int *)0=0;
#define ARRAY_CAP(x) sizeof((x))/sizeof(*(x))
#define FUNCTION static
#define GLOBAL static
#define MIN(x,y) ((x)>(y)?(y):(x))
#define MAX(x,y) ((x)>(y)?(x):(y))
#define CLAMP(min,x,max) MAX(min,MIN(max, x))
#define ABS(x) ((x)<0?-(x):(x))
#include <stdint.h>
typedef int64_t I64;
typedef uint64_t U64;
typedef uint32_t U32;