public int LexicalCompare(Ray3d other) { var cmp = Origin.LexicalCompare(other.Origin); if (cmp != 0) { return(cmp); } return(Direction.LexicalCompare(other.Direction)); }