diff options
Diffstat (limited to 'src/common.rs')
-rw-r--r-- | src/common.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.rs b/src/common.rs index 69f9a48..3f111ec 100644 --- a/src/common.rs +++ b/src/common.rs @@ -18,6 +18,9 @@ pub const LOOK_FROM: Point3 = Point3 { x: -2.0, y: 2.0, z: 1.0 }; pub const LOOK_AT: Point3 = Point3 { x: 0.0, y: 0.0, z: -1.0 }; pub const VUP: Vec3 = Vec3 { x: 0.0, y: 1.0, z: 0.0 }; +pub const DEFOCUS_ANGLE: f32 = 10.0; +pub const FOCUS_DIST: f32 = 4.0; + pub const fn get_image_height(image_width: usize, aspect_ratio: f32) -> usize { let image_height = (image_width as f32 / aspect_ratio) as usize; if image_width < 1 { 1 } else { image_height } |