def normalize(p):
    """Normalizes a point/vector

    Args:
        p ([float, float]): x and y coordinates
    Returns:
        float
    """
    l = math.sqrt(p[0]**2 + p[1]**2)
    return [0.0, 0.0] if l == 0 else [p[0]/l, p[1]/l]
def normalize ( p ) : l = math . sqrt ( p [ 0 ] ** 2 + p [ 1 ] ** 2 ) return [ 0.0 , 0.0 ] if l == 0 else [ p [ 0 ] / l , p [ 1 ] / l ]
Normalizes a point/vector

    Args:
        p ([float, float]): x and y coordinates
    Returns:
        float