# sm.util.axesToQuat

Constructs a quaternion from a X and Z axis

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.util.axesToQuat( xAxis, yAxis )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.util.md#axestoquat)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `xAxis` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The X axis. |
| `yAxis` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The Z axis. |

**Returns:**

| Name | Type | Description |
| --- | --- | --- |
| `rotation` | [Quat](../Game-Script-Environment/Userdata/Quat.md) | The quaternion. |

## Terrain

``` { .lua .api-signature }
sm.util.axesToQuat( xAxis, yAxis )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.util.md#axestoquat)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `xAxis` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The X axis. |
| `yAxis` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The Z axis. |

**Returns:**

| Name | Type | Description |
| --- | --- | --- |
| `rotation` | [Quat](../Terrain-Script-Environment/Userdata/Quat.md) | The quaternion. |
