geometry
calculate_distance(x1, y1, x2, y2)
Calculate the distance between two points.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x1 |
float
|
The x-coordinate of the first point. |
required |
y1 |
float
|
The y-coordinate of the first point. |
required |
x2 |
float
|
The x-coordinate of the second point. |
required |
y2 |
float
|
The y-coordinate of the second point. |
required |
Returns:
Type | Description |
---|---|
float
|
The distance between the two points. |
Source code in layerforge/utils/geometry.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|