From f2a8db6430dad0f59db40a37da03bc088016534e Mon Sep 17 00:00:00 2001 From: "max.nuding" Date: Fri, 8 Jul 2022 14:32:36 +0200 Subject: [PATCH] rename default aspect ratio --- src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index ed3bcb3..0d430c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,7 @@ mod rect; mod cuboid; // Image -const ASPECT_RATIO: f64 = 3.0 / 2.0; +const DEFAULT_ASPECT_RATIO: f64 = 3.0 / 2.0; const IMAGE_WIDTH: usize = 600; const SAMPLES_PER_PIXEL: i32 = 100; const MAX_DEPTH: i32 = 50; @@ -185,7 +185,7 @@ fn simple_light() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist, @@ -217,7 +217,7 @@ fn sun() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist, @@ -250,7 +250,7 @@ fn earth() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist, @@ -289,7 +289,7 @@ fn two_spheres() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist, @@ -325,7 +325,7 @@ fn two_perlin_spheres() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist, @@ -424,7 +424,7 @@ fn random_scene() -> Scene { look_from, look_at, Vec3::new(0.0, 1.0, 0.0), - ASPECT_RATIO, + DEFAULT_ASPECT_RATIO, 20.0, 0.0, focus_dist,