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

-   fromEuler(  
        out: [quat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.quat/),  
        x: number,  
        y: number,  
        z: number,  
        order?: "xyz" | "xzy" | "yxz" | "yzx" | "zxy" | "zyx",  
    ): [quat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.quat/)[](#fromeuler)
    
    Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.
    
    #### Parameters
    
    -   out: [quat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.quat/)
        
        the receiving quaternion
        
    -   x: number
        
        Angle to rotate around X axis in degrees.
        
    -   y: number
        
        Angle to rotate around Y axis in degrees.
        
    -   z: number
        
        Angle to rotate around Z axis in degrees.
        
    -   `Optional`order: "xyz" | "xzy" | "yxz" | "yzx" | "zxy" | "zyx"
        
        Intrinsic order for conversion, default is zyx.
        
    
    #### Returns [quat](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.quat/)
    
    out
    
    #### Function[](#function)
