Yeah I imagine that's not trivial. There's the winding number (warning: math) but that is defined for closed loops, so a slightly different situation
Yeah I imagine that's not trivial. There's the winding number (warning: math) but that is defined for closed loops, so a slightly different situation