From 409620fa388c4c067e83964ee50b72117ecc01f7 Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Tue, 23 Mar 2021 02:26:06 +0000 Subject: [PATCH] Tidy up the tile/image flip check Don't need double negation and brackets here. --- src/tiledimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index e2459660..f6eb36f2 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1500,7 +1500,7 @@ function getTile( tilesMatrix[ level ][ x ] = {}; } - if ( !tilesMatrix[ level ][ x ][ y ] || ((!!tilesMatrix[ level ][ x ][ y ].flipped) !== (!!tiledImage.flipped)) ) { + if ( !tilesMatrix[ level ][ x ][ y ] || !tilesMatrix[ level ][ x ][ y ].flipped !== !tiledImage.flipped ) { xMod = ( numTiles.x + ( x % numTiles.x ) ) % numTiles.x; yMod = ( numTiles.y + ( y % numTiles.y ) ) % numTiles.y; bounds = tiledImage.getTileBounds( level, x, y );