rename default aspect ratio

This commit is contained in:
max.nuding 2022-07-08 14:32:36 +02:00
parent 9ce878a47a
commit f2a8db6430
Failed to extract signature

View File

@ -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,