import math


def distance(x1: float, y1: float, x2: float, y2: float):
    """
    Return distance between two 2D points.
    """
    dx = x2 - x1
    dy = y2 - y1
    return math.sqrt(dx * dx + dy * dy)