public class PositionHelper extends Object
Constructor and Description |
---|
PositionHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
inCicle(int x,
int y,
int centerX,
int centerY,
int r)
calcul if a point is in a circle.
|
static boolean |
isOutRoundBorder(int x,
int y,
int width,
int height,
int radius) |
static int |
zone(int x,
int y,
int centerX,
int centerY)
determine the zone of a point.
1 2
c
3 4
|
public static boolean inCicle(int x, int y, int centerX, int centerY, int r)
x
- coord. x of the pointy
- coord. y of the pointcenterX
- center x of the circlecenterY
- center y of the circler
- radius of the circlepublic static int zone(int x, int y, int centerX, int centerY)
x
- position x of the point.y
- position y of the point.centerX
- position x of the center.centerY
- position y of the center.public static boolean isOutRoundBorder(int x, int y, int width, int height, int radius)
Copyright © 2012-2018. All Rights Reserved.