---
name: "BIS_fnc_terrainGradAngle"
type: function
status: ok
groups: ["Geometry"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_terrainGradAngle
revid: 328359
updated: 2022-07-13T16:00:47Z
---

# BIS_fnc_terrainGradAngle

*Function · Geometry · Arma 3 v1.00*

## Description

Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction.
It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.

## Syntax

**Parameters:**

- `object`: [Object](../topics/Object.md) or [Position](../topics/Position.md)
- `direction`: [Number](../topics/Number.md) - direction where should be gradient calculated (compass direction)
- `delta`: [Number](../topics/Number.md) - which stepsize should be used

**Returns:** [Number](../topics/Number.md) - gradient angle in radians

## Examples

### Example 1

```sqf
private _radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;
```

## See also

[getDir](../commands/getDir.md) · [surfaceNormal](../commands/surfaceNormal.md)

<sub>Source: [BI Community Wiki — BIS fnc terrainGradAngle](https://community.bistudio.com/wiki/BIS_fnc_terrainGradAngle) (revision 328359).</sub>
