You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
247 B
12 lines
247 B
5 years ago
|
import numpy as np
|
||
|
|
||
|
from .point import Point
|
||
|
|
||
|
|
||
|
def dist(p: Point, q: Point) -> float:
|
||
|
"""
|
||
|
Calculates the Euclidian Distance of a point and another point.
|
||
|
"""
|
||
|
return np.sqrt(pow(q.x - p.x, 2) +
|
||
|
pow(q.y - p.y, 2))
|