From 45fafbcd4b41a5388ece377c4e051b5846407288 Mon Sep 17 00:00:00 2001 From: lamp Date: Sun, 21 Jan 2024 17:03:07 +0000 Subject: fmt and tidy --- src/texture/image_texture.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/texture/image_texture.rs') diff --git a/src/texture/image_texture.rs b/src/texture/image_texture.rs index 763c3f0..d90b9b6 100644 --- a/src/texture/image_texture.rs +++ b/src/texture/image_texture.rs @@ -50,8 +50,12 @@ impl Texture for ImageTexture { let mut i = (u * self.width as f64) as usize; let mut j = (v * self.height as f64) as usize; - if i >= self.width { i = self.width - 1 }; - if j >= self.height { j = self.height - 1 }; + if i >= self.width { + i = self.width - 1 + }; + if j >= self.height { + j = self.height - 1 + }; let color_scale = 1.0 / 255.0; let pixel = j * self.bytes_per_scanline + i * BYTES_PER_PIXEL; Color { -- cgit v1.2.3