public final class Coords
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DOWN |
static int |
LEFT |
static int |
RIGHT |
static int |
UP |
Modifier and Type | Method and Description |
---|---|
static int |
getDis(int rawDistance)
Returns distance corrected by scale
|
static float |
getScale()
Returns scale based on current resolution
|
static float |
getSize(float rawSize)
Returns size corrected by scale
|
static float |
getX(java.lang.String point,
float dis)
Returns scaled position on x-axis related to specific point on screen
|
static float |
getY(java.lang.String point,
float dis)
Returns scaled position on y-axis related to specific point on screen
|
static boolean |
isIn(Position posToCheck,
Position posStart,
Position posEnd)
Checks if specified coordinates are between two specified positions
|
public static final int UP
public static final int RIGHT
public static final int DOWN
public static final int LEFT
public static float getX(java.lang.String point, float dis)
point
- "TL" - for top left, "BL" - for bottom left, "TR" - for top right, "BR" - for bottom right, "CE" - for centerdis
- Distance from specific pointpublic static float getY(java.lang.String point, float dis)
point
- "TL" - for top left, "BL" - for bottom left, "TR" - for top right, "BR" - for bottom right, "CE" - for centerdis
- Distance from specific pointpublic static int getDis(int rawDistance)
rawDistance
- Distance on 1920x1080public static float getSize(float rawSize)
rawSize
- Size on 1920x1080public static float getScale()
public static boolean isIn(Position posToCheck, Position posStart, Position posEnd)
posToCheck
- Position to checkposStart
- Start of areaposEnd
- End of area