geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/TileUtils.java
public static float tileDensity(float density, int tileWidth, int tileHeight) {
        return tileDensity(density, Math.min(tileWidth, tileHeight));
    }
public static float tileDensity(float density, int tileWidth, int tileHeight) {
        return tileDensity(density, Math.min(tileWidth, tileHeight));
    }
Get the tile density based upon the display density scale and tile dimensions

@param density    display density: {@link android.util.DisplayMetrics#density}
@param tileWidth  tile width
@param tileHeight tile height
@return tile density