getQuadrant func

This commit is contained in:
yugecin 2016-09-27 18:36:09 +02:00
parent b842a564f7
commit b1894ade26

View File

@ -561,4 +561,12 @@ public class Utils {
return null; return null;
} }
} }
public static int getQuadrant(double x, double y) {
if (x < Container.width / 2d) {
return y < Container.height / 2d ? 2 : 3;
}
return y < Container.height / 2d ? 1 : 4;
}
} }