Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Created July 16, 2011 00:10
Show Gist options
  • Save beelsebob/1085813 to your computer and use it in GitHub Desktop.
Save beelsebob/1085813 to your computer and use it in GitHub Desktop.
if (obj1.position.y < obj2.position.y)
{
return NSOrderedAscending;
}
else if (obj1.position.y > obj2.position.y)
{
return NSOrderedDescending;
}
else
{
if (obj1.position.x < obj2.position.x)
{
return NSOrderedAscending;
}
else if (obj1.position.x > obj2.position.x)
{
retrun = NSOrderedDescending;
}
else
{
return NSorderedSame;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment