public int [ ] PixelsToTile ( int px , int py ) { int tx = ( int ) Math . ceil ( px / ( ( double ) tileSize ) - 1 ) ; int ty = ( int ) Math . ceil ( py / ( ( double ) tileSize ) - 1 ) ; return new int [ ] { tx , ty } ; }
Returns a tile covering region in given pixel coordinates