Fix calculating the next edge in clockwise/anti-clockwise direction