diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-22 00:19:58 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-22 00:19:58 +1000 |
commit | 4f09bcb7dc48dc9b0d97ce3a9f73ffc6eee49045 (patch) | |
tree | e94bb84660061941c12eb25455a1a855649416a7 /src/maths/maths.h | |
parent | da1ddc29ac15e511086b8b5343b735a34be1fcea (diff) |
error handling loading pbr textures
Diffstat (limited to 'src/maths/maths.h')
-rw-r--r-- | src/maths/maths.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/maths/maths.h b/src/maths/maths.h index ec6e90a..59e304c 100644 --- a/src/maths/maths.h +++ b/src/maths/maths.h @@ -42,13 +42,14 @@ c_static_inline Vec3 vec3_cross(Vec3 a, Vec3 b) { Vec3){ .x = a.y * b.z - a.z * b.y, .y = a.z * b.x - a.x * b.z, .z = a.x * b.y - a.y * b.x }; } -#define VEC3_ZERO ((Vec3){ .x = 0.0, .y = 0.0, .z = 0.0 }) -#define VEC3_X ((Vec3){ .x = 1.0, .y = 0.0, .z = 0.0 }) -#define VEC3_NEG_X ((Vec3){ .x = -1.0, .y = 0.0, .z = 0.0 }) -#define VEC3_Y ((Vec3){ .x = 0.0, .y = 1.0, .z = 0.0 }) -#define VEC3_NEG_Y ((Vec3){ .x = 0.0, .y = -1.0, .z = 0.0 }) -#define VEC3_Z ((Vec3){ .x = 0.0, .y = 0.0, .z = 1.0 }) -#define VEC3_NEG_Z ((Vec3){ .x = 0.0, .y = 0.0, .z = -1.0 }) +static const Vec3 VEC3_X = vec3(1.0, 0.0, 0.0); +static const Vec3 VEC3_NEG_X = vec3(-1.0, 0.0, 0.0); +static const Vec3 VEC3_Y = vec3(0.0, 1.0, 0.0); +static const Vec3 VEC3_NEG_Y = vec3(0.0, -1.0, 0.0); +static const Vec3 VEC3_Z = vec3(0.0, 0.0, 1.0); +static const Vec3 VEC3_NEG_Z = vec3(0.0, 0.0, -1.0); +static const Vec3 VEC3_ZERO = vec3(0.0, 0.0, 0.0); +static const Vec3 VEC3_ONES = vec3(1.0, 1.0, 1.0); c_static_inline void print_vec3(Vec3 v) { printf("{ x: %f, y: %f, z: %f )\n", (f64)v.x, (f64)v.y, (f64)v.z); |