try / utils.py
mtalamon's picture
Upload 5 files
1bc2204 verified
raw
history blame
180 Bytes
import math
def extract_point(obj, pt):
return obj.width*pt.x,obj.height* pt.y
def compute_distance(pt1, pt2):
return math.sqrt((pt1[0]- pt2[0])**2 + (pt1[1]- pt2[1])**2)