day 09
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user