Use unsigned_abs to satisfy clippy

This commit is contained in:
Gwilym Kuiper 2022-04-11 21:15:17 +01:00
parent 0bb364f333
commit f304412053

View file

@ -255,8 +255,8 @@ impl Tag {
Direction::Forward => self.sprite(idx % self.len), Direction::Forward => self.sprite(idx % self.len),
Direction::Backward => self.sprite(len_sub_1 - (idx % self.len)), Direction::Backward => self.sprite(len_sub_1 - (idx % self.len)),
Direction::Pingpong => self.sprite( Direction::Pingpong => self.sprite(
(((idx + len_sub_1) % (len_sub_1 * 2)) as isize - len_sub_1 as isize).abs() (((idx + len_sub_1) % (len_sub_1 * 2)) as isize - len_sub_1 as isize)
as usize, .unsigned_abs(),
), ),
} }
} }