---
name: "BIS_fnc_getLineDist"
type: function
status: ok
groups: ["Geometry"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_getLineDist
revid: 329321
updated: 2022-07-27T10:15:11Z
---

# BIS_fnc_getLineDist

*Function · Geometry · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Return the distance between two sections of a virtual straight line.

## Syntax

```sqf
[start1, length1, start2, length2] call BIS_fnc_getLineDist
```

**Parameters:**

- `start1`: [Number](../topics/Number.md) - segment 1 beginning. Can be negative
- `length1`: [Number](../topics/Number.md) - segment 1 length. Can be negative
- `start2`: [Number](../topics/Number.md) - segment 2 beginning. Can be negative
- `length2`: [Number](../topics/Number.md) - segment 2 length. Can be negative

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
private _distance = [0,5,15,20] call BIS_fnc_getLineDist; // returns 10
```

## See also

[distance](../commands/distance.md)

<sub>Source: [BI Community Wiki — BIS fnc getLineDist](https://community.bistudio.com/wiki/BIS_fnc_getLineDist) (revision 329321).</sub>
