Skip to content

Instantly share code, notes, and snippets.

@JT5D
Forked from unitycoder/CustomStructSort
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save JT5D/7e4883b91ef95afc9aff to your computer and use it in GitHub Desktop.

Select an option

Save JT5D/7e4883b91ef95afc9aff to your computer and use it in GitHub Desktop.
carves.Sort(delegate(Carve a, Carve b) { return a.cumulativeDifference.CompareTo(b.cumulativeDifference); });
/*
// example struct values
public struct Carve
{
public float cumulativeDifference;
public List<int> x;
public List<int> y;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment