From 73d60fb7e4d8edd7e8ab0b14718121038edc2eb2 Mon Sep 17 00:00:00 2001 From: Godzil Date: Mon, 17 Feb 2020 19:09:31 +0000 Subject: [PATCH] Fix a copy mistake. --- tests/ch5_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ch5_test.cpp b/tests/ch5_test.cpp index 2d9c80f..dabb71f 100644 --- a/tests/ch5_test.cpp +++ b/tests/ch5_test.cpp @@ -29,7 +29,7 @@ int main() double worldY = (wallSize / 2) - pixelSize * y; for(x = 0; x < c.width; x++) { - double worldX = (wallSize / 2) - pixelSize * x; + double worldX = -(wallSize / 2) + pixelSize * x; Point position = Point(worldX, worldY, wallDistance); Ray r = Ray(cameraOrigin, (position - cameraOrigin).normalise()); Intersect xs = s.intersect(r);