This commit is contained in:
Georgios Samaras
2024-12-09 17:46:40 +01:00
parent 0f6f538786
commit c627e6f917
6 changed files with 131 additions and 1 deletions
+6
View File
@@ -57,6 +57,12 @@ typedef double f64;
#define Megabytes(x) ((u64) (x) << 20)
#define Gigabytes(x) ((u64) (x) << 30)
#define DYNAMIC_ARRAY(type) \
struct { \
type *data; \
isize len, cap; \
}
#define push(slice, arena) \
((slice)->len >= ((slice)->cap) \
? grow(slice, sizeof(*(slice)->data), arena), \
+1 -1
View File
@@ -134,7 +134,7 @@ vec2_sub(Vec2 a, Vec2 b) {
static inline Vec2
vec2(f32 x, f32 y) {
Vec2 result = { x, y };
Vec2 result = {{ x, y }};
return result;
}