summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-07-13 04:33:07 -0500
committertom barrett <spalf0@gmail.com>2019-07-13 04:33:07 -0500
commitb4e83e63d46fdbc40f548bfa9bd95d7ed9912b8d (patch)
tree5a08d8a668400fc395584ba6d2616db30c3d6b36
parentced37025a37051db896443d310f5f613f1281882 (diff)
fmt
-rw-r--r--src/tileset.rs15
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])