aboutsummaryrefslogtreecommitdiff
path: root/src/texture/image_texture.rs
diff options
context:
space:
mode:
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 {