if they're supposed to be ordered in a certain way, you'll want to specify that exact way (for example by euclidean distance from 0/0/0). If all you want is to distinguish different points, you could do something like
x == x2 ? (y == y2 ? (z < z2) : y < y2) : x < x2