aboutsummaryrefslogtreecommitdiff
path: root/src/texture/image_texture.rs
diff options
context:
space:
mode:
authorlamp2024-01-21 17:03:07 +0000
committerlamp2024-01-21 17:03:07 +0000
commit45fafbcd4b41a5388ece377c4e051b5846407288 (patch)
tree2192c471ca3b47671f0906e27f6f6088f40b3d8a /src/texture/image_texture.rs
parent89a5c9a8a0cdf627cda0e31da454f83ca21315ce (diff)
fmt and tidy
Diffstat (limited to 'src/texture/image_texture.rs')
-rw-r--r--src/texture/image_texture.rs8
1 files changed, 6 insertions, 2 deletions
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 {