File size: 215 Bytes
e6748e7
 
 
 
 
 
 
1
2
3
4
5
6
7
import math

def calculate_pixel_length(start_point, end_point):
    """Calculates the pixel length of a line."""
    x1, y1 = start_point
    x2, y2 = end_point
    return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)