fix viewport size

This commit is contained in:
Fabien Freling 2021-04-24 17:53:11 +02:00
parent 6a0e48a006
commit b6c85bcb91

View file

@ -56,7 +56,7 @@ pub fn main() anyerror!void {
// Camera
const viewportHeight = 2.0;
const viewportWidth = @floatToInt(usize, viewportHeight * aspectRatio);
const viewportWidth = viewportHeight * aspectRatio;
const focalLength = 1.0;
const origin = Vec3{};