---
title: "length | 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.

# Function length

-   length(a: [ReadonlyVec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyVec3/)): number[](#length)
    
    Calculates the length of a vec3
    
    #### Parameters
    
    -   a: [ReadonlyVec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyVec3/)
        
        vector to calculate length of
        
    
    #### Returns number
    
    length of a
