Fix project_point function

This commit is contained in:
Abdelrahman Said 2024-06-30 00:08:38 +01:00
parent 0911b33981
commit 01c5def71f

View File

@ -8,8 +8,8 @@ vec2i_t project_point(vec3f_t point, const window_t *wnd,
return (vec2i_t){.x = 0, .y = 0};
}
f32 x = point.x * viewport.x / point.z;
f32 y = point.y * viewport.y / point.z;
f32 x = point.x * viewport.z / point.z;
f32 y = point.y * viewport.z / point.z;
return viewport_to_window(wnd, x, y, viewport);
}