---
title: "rotateY | 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 rotateY

-   rotateY(out: [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/), a: [ReadonlyMat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyMat4/), rad: number): [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/)[](#rotatey)
    
    Rotates a matrix by the given angle around the Y axis
    
    #### Parameters
    
    -   out: [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/)
        
        the receiving matrix
        
    -   a: [ReadonlyMat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyMat4/)
        
        the matrix to rotate
        
    -   rad: number
        
        the angle to rotate the matrix by
        
    
    #### Returns [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/)
    
    out
