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

# Namespace vec4

## Functions[](#functions)

[add](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.add/)[](#add)

[ceil](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.ceil/)[](#ceil)

[clone](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.clone/)[](#clone)

[copy](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.copy/)[](#copy)

[create](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.create/)[](#create)

[cross](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.cross/)[](#cross)

[dist](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.dist/)[](#dist)

[distance](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.distance/)[](#distance)

[div](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.div/)[](#div)

[divide](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.divide/)[](#divide)

[dot](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.dot/)[](#dot)

[equals](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.equals/)[](#equals)

[exactEquals](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.exactEquals/)[](#exactequals)

[floor](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.floor/)[](#floor)

[forEach](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.forEach/)[](#foreach)

[fromValues](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.fromValues/)[](#fromvalues)

[inverse](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.inverse/)[](#inverse)

[len](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.len/)[](#len)

[length](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.length/)[](#length)

[lerp](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.lerp/)[](#lerp)

[max](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.max/)[](#max)

[min](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.min/)[](#min)

[mul](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.mul/)[](#mul)

[multiply](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.multiply/)[](#multiply)

[negate](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.negate/)[](#negate)

[normalize](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.normalize/)[](#normalize)

[random](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.random/)[](#random)

[round](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.round/)[](#round)

[scale](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.scale/)[](#scale)

[scaleAndAdd](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.scaleAndAdd/)[](#scaleandadd)

[set](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.set/)[](#set)

[sqrDist](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.sqrDist/)[](#sqrdist)

[sqrLen](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.sqrLen/)[](#sqrlen)

[squaredDistance](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.squaredDistance/)[](#squareddistance)

[squaredLength](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.squaredLength/)[](#squaredlength)

[str](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.str/)[](#str)

[sub](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.sub/)[](#sub)

[subtract](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.subtract/)[](#subtract)

[transformMat4](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.transformMat4/)[](#transformmat4)

[transformQuat](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.transformQuat/)[](#transformquat)

[zero](https://docs.maptiler.com/sdk-js/api-reference/functions/Externals.vec4.zero/)[](#zero)
