Use Linq. Not the fastest, but quick and easy…
using System.Linq; List<NodePos> sortedNodes = nodes.OrderBy(o => o.distance).ToList();
Use Linq. Not the fastest, but quick and easy…
using System.Linq; List<NodePos> sortedNodes = nodes.OrderBy(o => o.distance).ToList();