Fix project_point function
This commit is contained in:
parent
0911b33981
commit
01c5def71f
@ -8,8 +8,8 @@ vec2i_t project_point(vec3f_t point, const window_t *wnd,
|
|||||||
return (vec2i_t){.x = 0, .y = 0};
|
return (vec2i_t){.x = 0, .y = 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 x = point.x * viewport.x / point.z;
|
f32 x = point.x * viewport.z / point.z;
|
||||||
f32 y = point.y * viewport.y / point.z;
|
f32 y = point.y * viewport.z / point.z;
|
||||||
|
|
||||||
return viewport_to_window(wnd, x, y, viewport);
|
return viewport_to_window(wnd, x, y, viewport);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user