From 7c74469324ba13a0793a59b55d379eaa4d8fd06c Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 20 Apr 2024 17:53:24 +0300 Subject: [PATCH] Remove useless prefix --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index e0a40d3..dcb6806 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,15 +93,15 @@ fn main() -> io::Result<()> { let yaw = PI / 4.0; let pitch = PI / 6.0; let roll = 0.0f32; - let m_roll = glm::mat3( + let m_roll = mat3( roll.cos(), roll.sin(), 0.0, -roll.sin(), roll.cos(), 0.0, 0.0, 0.0, 1.0); - let m_yaw = glm::mat3( + let m_yaw = mat3( yaw.cos(), 0.0, yaw.sin(), 0.0, 1.0, 0.0, -yaw.sin(), 0.0, yaw.cos()); - let m_pitch = glm::mat3( + let m_pitch = mat3( 1.0, 0.0, 0.0, 0.0, pitch.cos(), -pitch.sin(), 0.0, pitch.sin(), pitch.cos()); @@ -126,7 +126,7 @@ fn main() -> io::Result<()> { let ray = m_camera * normalize(ray); for f in &mesh { - let color = glm::clamp(to_ivec3(f.normal * 120.0 + 128.0), ivec3(0, 0, 0), ivec3(255, 255, 255)); + let color = clamp(to_ivec3(f.normal * 120.0 + 128.0), ivec3(0, 0, 0), ivec3(255, 255, 255)); let ds = (0..3).map(|k| edge_dist(f.vertices[k], f.vertices[(k + 1) % 3], base, ray)); if ds.into_iter().all(|d| d > 0.0) { img.put_pixel(x, y, Color(color.x as u8, color.y as u8, color.z as u8));