Optimized calculations, tileSize is now an object, so is pi.