Last active
August 29, 2015 13:57
-
-
Save thejavalistener/9385907 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// obtengo el signo | |
char sign = keys[i][UIndex.SIGN].charAt(0); | |
// si los dos valores son iguales => paso al proximo | |
if( comp==0 ) | |
{ | |
continue; | |
} | |
// v1 es mayor que v2 | |
if( comp>0 ) | |
{ | |
if( sign=='+' ) | |
{ | |
return 1; | |
} | |
else // v1 es menor que v2 | |
{ | |
return -1; | |
} | |
} | |
else | |
{ | |
if( sign=='+' ) | |
{ | |
return -1; | |
} | |
else // v1 es menor que v2 | |
{ | |
return 1; | |
} | |
} | |
} | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment