Given the simple code block below, I was wondering if there was a better way to code this in C#
int lowIndex = 0;
int highIndex = 1;
if (end[0].X.ConvertToMillimetres() == end[1].X.ConvertToMillimetres())
{
if (end[0].Y.ConvertToMillimetres() > end[1].Y.ConvertToMillimetres())
{
lowIndex = 1;
highIndex = 0;
}
}
else
{
if (end[0].X.ConvertToMillimetres() > end[1].X.ConvertToMillimetres())
{
lowIndex = 1;
highIndex = 0;
}
}
How about something like