Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if((int)t1 == 0){
- if((int)t2 == 0){
- // both zero
- return 0;
- }
- // only the first val is zero
- return 1;
- }else if((int)t2 == 0){
- // only the second val is zero
- return -1;
- }else{
- // no val is zero -> compare them
- return (int) (t1
- - t2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement