diff options
author | tom barrett <spalf0@gmail.com> | 2019-07-13 04:33:07 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-07-13 04:33:07 -0500 |
commit | b4e83e63d46fdbc40f548bfa9bd95d7ed9912b8d (patch) | |
tree | 5a08d8a668400fc395584ba6d2616db30c3d6b36 /src | |
parent | ced37025a37051db896443d310f5f613f1281882 (diff) |
fmt
Diffstat (limited to 'src')
-rw-r--r-- | src/tileset.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tileset.rs b/src/tileset.rs index effba3b..fe2f84b 100644 --- a/src/tileset.rs +++ b/src/tileset.rs @@ -95,9 +95,7 @@ impl Tileset { let first_tile = self .tiles .iter() - .find( - |(id, _)| id == &&tile_id - ) + .find(|(id, _)| id == &&tile_id) .unwrap() .1 .clone(); @@ -109,11 +107,14 @@ impl Tileset { .cloned() .filter(|t| { t.properties.entity == first_tile.properties.entity - && (t.properties.rotation - first_tile.properties.rotation) < constants::FLOAT_PRECISION - && t.source.x.is_sign_positive() == first_tile.source.x.is_sign_positive() - && t.source.y.is_sign_positive() == first_tile.source.y.is_sign_positive() + && (t.properties.rotation - first_tile.properties.rotation) + < constants::FLOAT_PRECISION + && t.source.x.is_sign_positive() + == first_tile.source.x.is_sign_positive() + && t.source.y.is_sign_positive() + == first_tile.source.y.is_sign_positive() }) - .collect() + .collect(), ) } else { Animation::new(vec![first_tile]) |