File size: 180 Bytes
1bc2204
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
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)