Vector min but for length

I have 2 vectors and I want to use the vector with the smaller length but the only min function I can find for vectors uses their components. I know I could use trigonometry to find it but I don’t really feel like doing it.

You may have to make a small function for that.

func min_len(a: Vector2, b: Vector2) -> Vector2:
    if a.length_squared() < b.length_squared():
        return a
    else:
        return b