Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created March 11, 2015 12:08
Show Gist options
  • Select an option

  • Save unitycoder/20cf98d5c5e3a346ee9d to your computer and use it in GitHub Desktop.

Select an option

Save unitycoder/20cf98d5c5e3a346ee9d to your computer and use it in GitHub Desktop.

Revisions

  1. unitycoder created this gist Mar 11, 2015.
    12 changes: 12 additions & 0 deletions CustomStructSort
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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;
    }
    */