Inline the modulos

This commit is contained in:
Corwin 2022-03-05 18:02:52 +00:00
parent 900cd007df
commit 4c57f85acd

View file

@ -157,6 +157,7 @@ impl Tag {
&self.get_sprites()[idx] &self.get_sprites()[idx]
} }
#[inline]
pub fn get_animation_sprite(&self, idx: usize) -> &'static Sprite { pub fn get_animation_sprite(&self, idx: usize) -> &'static Sprite {
let len_sub_1 = self.len - 1; let len_sub_1 = self.len - 1;
match self.direction { match self.direction {