@ A nicer version of this file (the logic is the same, the code is cleaner)

This commit is contained in:
codeimp 2010-09-17 17:20:46 +00:00
parent 1ffb85438c
commit c978ea3477

View file

@ -27,14 +27,7 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
// Comparer
public int Compare(SectorLevel x, SectorLevel y)
{
float delta = x.plane.GetZ(center) - y.plane.GetZ(center);
if(delta > 0.0f)
return 1;
else if(delta < 0.0f)
return -1;
else
return 0;
return Math.Sign(x.plane.GetZ(center) - y.plane.GetZ(center));
}
}
}