Lat, Lon values from the tile's x, y values?

I posted a while ago and found out a little later that the way I asked the question was wrong.

//correct the latitude to go from 0 (north) to 180 (south),
// instead of 90(north) to -90(south)
latitude=90-latitude;
//correct the longitude to go from 0 to 360
longitude=180+longitude;

//find tile size from zoom level
double latTileSize=180/(pow(2,(17-zoom)));
double longTileSize=360/(pow(2,(17-zoom)));

//find the tile coordinates
int tilex=(int)(longitude/longTileSize);
int tiley=(int)(latitude/latTileSize);

Currently, Google, Bingmap, and OSM have a common method of calculating X and Y from latitude and longitude, and this is described.

ImageryProvider: new Cesium.TileCoordinatesImageryProvider();

shows that when checking the x,y coordinates arranged for each grid of Cesium, the value of tile.x, tile.y returned from cesium differs greatly from that of other systems.

Terrain tiling system / coordinate system - CesiumJS - Cesium Community

I’ve referenced posts you’ve answered before, but most of the links either expired or point to something else entirely.
Is there a separate part for managing these formulas in cesium?
I wonder how this part is calculated in Cesium.

The code using the formula has the structure of C#, but I am porting it to JS.

Hi SeYeon,

We support several image provides, some of which use the typical Web Mercator scheme that I think your referring to here.

TileCoordinatesImageryProvider is a overlay which is mostly used for debug purposes.

You can change the tiling scheme rendering by passing in an alternative TilingScheme as one of the constructor options:

const imageryProvider = new Cesium.TileCoordinatesImageryProvider({
      tilingScheme: new Cesium.WebMercatorTilingScheme()
    });