Add vector magnitude calculation

This commit is contained in:
2023-12-20 16:37:50 +00:00
parent 2ec654774e
commit 0345f90405
3 changed files with 27 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ solutions_t ray_intersects_sphere(vec3f_t origin, vec3f_t direction,
colour_t trace_ray(vec3f_t origin, vec3f_t direction, f32 t_min, f32 t_max,
const scene_t *scene, colour_t default_colour);
int main(int argc, char *argv[]) {
i32 main(i32 argc, char *argv[]) {
colour_t bg = (colour_t){.r = 27, .g = 38, .b = 79, .a = 255};
vec3f_t camera = {.x = 0.0f, .y = 0.0f, .z = 0.0f};
vec3f_t viewport = {.x = 1.0f, .y = 1.0f, .z = 1.0f};