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

-   getAxisAngle(out\_axis: [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/), q: [ReadonlyQuat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyQuat/)): number[](#getaxisangle)
    
    Gets the rotation axis and angle for a given quaternion. If a quaternion is created with setAxisAngle, this method will return the same values as providied in the original parameter list OR functionally equivalent values. Example: The quaternion formed by axis \[0, 0, 1\] and angle -90 is the same as the quaternion formed by \[0, 0, 1\] and 270. This method favors the latter.
    
    #### Parameters
    
    -   out\_axis: [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/)
        
        Vector receiving the axis of rotation
        
    -   q: [ReadonlyQuat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyQuat/)
        
        Quaternion to be decomposed
        
    
    #### Returns number
    
    Angle, in radians, of the rotation
