summaryrefslogtreecommitdiff
path: root/src/global.rs
diff options
context:
space:
mode:
authorRosyid Haryadi <rosyid_haryadi@protonmail.com>2025-03-01 12:07:31 +0700
committerRosyid Haryadi <rosyid_haryadi@protonmail.com>2025-03-01 12:07:31 +0700
commitfea1e609e6003f68a351438ebd9d00e109e930cc (patch)
treee077ee4aba3f3ea18c4dc4e433c6d6e100693340 /src/global.rs
parentf3b0b1846c03bb2252830147481ba56056d6a405 (diff)
fix type
Diffstat (limited to 'src/global.rs')
-rw-r--r--src/global.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/global.rs b/src/global.rs
index b322746..9357920 100644
--- a/src/global.rs
+++ b/src/global.rs
@@ -8,9 +8,9 @@ pub const IMG_WIDTH: usize = 400;
const IMG_HEIGHT_TMP: usize = (IMG_WIDTH as f32 / ASPECT_RATIO) as usize;
pub const IMG_HEIGHT: usize = if (IMG_HEIGHT_TMP < 1) { 1 } else { IMG_HEIGHT_TMP };
-pub const VIEWPORT_HEIGHT: usize = 2;
-pub const VIEWPORT_WIDTH: usize = VIEWPORT_HEIGHT * (IMG_WIDTH / IMG_HEIGHT);
-pub const FOCAL_LENGTH: f32 = 2.0;
+pub const VIEWPORT_HEIGHT: f32 = 2.0;
+pub const VIEWPORT_WIDTH: f32 = VIEWPORT_HEIGHT * (IMG_WIDTH as f32 / IMG_HEIGHT as f32);
+pub const FOCAL_LENGTH: f32 = 1.0;
pub const CAMERA_CENTER: Point3 = Point3 { x: 0f32, y: 0f32, z: 0f32 };
#[derive(Debug, Copy, Clone)]