---
title: "slerpVectors | Weather SDK | JavaScript maps SDK"
description: "Documentation for Weather JS"
---

# Function slerpVectors

-   slerpVectors(start: [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/), end: [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/), interpolationFactor: number): [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/)[](#slerpvectors)
    
    Performs spherical linear interpolation (SLERP) between two 3D vertices.
    
    #### Parameters
    
    -   start: [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/)
        
        The starting vertex (unit vector) for interpolation.
        
    -   end: [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/)
        
        The ending vertex (unit vector) for interpolation.
        
    -   interpolationFactor: number
        
        A number between 0 and 1 that controls the interpolation; 0 returns the 'start' vector, 1 returns the 'end' vector.
        
    
    #### Returns [Vertex](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/Vertex/)
    
    The interpolated vertex computed via spherical linear interpolation.
