---
title: "math | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Variable math`Const`

math: {  
    circumferenceAtLatitude: typeof [circumferenceAtLatitude](https://docs.maptiler.com/sdk-js/api-reference/functions/circumferenceAtLatitude/);  
    EARTH\_CIRCUMFERENCE: number;  
    EARTH\_RADIUS: number;  
    haversineCumulatedDistanceWgs84: typeof [haversineCumulatedDistanceWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineCumulatedDistanceWgs84/);  
    haversineDistanceWgs84: typeof [haversineDistanceWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineDistanceWgs84/);  
    haversineIntermediateWgs84: typeof [haversineIntermediateWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineIntermediateWgs84/);  
    latitudeToMercatorY: typeof [latitudeToMercatorY](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.latitudeToMercatorY/);  
    longitudeToMercatorX: typeof [longitudeToMercatorX](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.longitudeToMercatorX/);  
    mercatorToTileIndex: typeof [mercatorToTileIndex](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorToTileIndex/);  
    mercatorToWgs84: typeof [mercatorToWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorToWgs84/);  
    mercatorXToLongitude: typeof [mercatorXToLongitude](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorXToLongitude/);  
    mercatorYToLatitude: typeof [mercatorYToLatitude](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorYToLatitude/);  
    toDegrees: typeof [toDegrees](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.toDegrees/);  
    toRadians: typeof [toRadians](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.toRadians/);  
    wgs84ToMercator: typeof [wgs84ToMercator](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wgs84ToMercator/);  
    wgs84ToTileIndex: typeof [wgs84ToTileIndex](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wgs84ToTileIndex/);  
    wrapWgs84: typeof [wrapWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wrapWgs84/);  
}

#### Type Declaration

-   ##### circumferenceAtLatitude: typeof [circumferenceAtLatitude](https://docs.maptiler.com/sdk-js/api-reference/functions/circumferenceAtLatitude/)
    
-   ##### EARTH\_CIRCUMFERENCE: number
    
-   ##### EARTH\_RADIUS: number
    
-   ##### haversineCumulatedDistanceWgs84: typeof [haversineCumulatedDistanceWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineCumulatedDistanceWgs84/)
    
-   ##### haversineDistanceWgs84: typeof [haversineDistanceWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineDistanceWgs84/)
    
-   ##### haversineIntermediateWgs84: typeof [haversineIntermediateWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.haversineIntermediateWgs84/)
    
-   ##### latitudeToMercatorY: typeof [latitudeToMercatorY](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.latitudeToMercatorY/)
    
-   ##### longitudeToMercatorX: typeof [longitudeToMercatorX](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.longitudeToMercatorX/)
    
-   ##### mercatorToTileIndex: typeof [mercatorToTileIndex](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorToTileIndex/)
    
-   ##### mercatorToWgs84: typeof [mercatorToWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorToWgs84/)
    
-   ##### mercatorXToLongitude: typeof [mercatorXToLongitude](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorXToLongitude/)
    
-   ##### mercatorYToLatitude: typeof [mercatorYToLatitude](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.mercatorYToLatitude/)
    
-   ##### toDegrees: typeof [toDegrees](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.toDegrees/)
    
-   ##### toRadians: typeof [toRadians](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.toRadians/)
    
-   ##### wgs84ToMercator: typeof [wgs84ToMercator](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wgs84ToMercator/)
    
-   ##### wgs84ToTileIndex: typeof [wgs84ToTileIndex](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wgs84ToTileIndex/)
    
-   ##### wrapWgs84: typeof [wrapWgs84](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.wrapWgs84/)
