Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int quadrant(int x, int y) {
- if (x == 0 || y == 0)
- return 0;
- if (x > 0) {
- if (y > 0) {
- return 1;
- } else {
- return 4;
- }
- } else {
- if (y > 0) {
- return 2;
- } else {
- return 3;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement