Package org.javlo.image
Class PositionHelper
- java.lang.Object
-
- org.javlo.image.PositionHelper
-
public class PositionHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description PositionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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
-
-
-
Method Detail
-
inCicle
public static boolean inCicle(int x, int y, int centerX, int centerY, int r)
calcul if a point is in a circle.- Parameters:
x
- coord. x of the pointy
- coord. y of the pointcenterX
- center x of the circlecenterY
- center y of the circler
- radius of the circle- Returns:
- true if point is in the circle.
-
zone
public static int zone(int x, int y, int centerX, int centerY)
determine the zone of a point. 1 2 c 3 4- Parameters:
x
- position x of the point.y
- position y of the point.centerX
- position x of the center.centerY
- position y of the center.- Returns:
- the zone of the point.
-
isOutRoundBorder
public static boolean isOutRoundBorder(int x, int y, int width, int height, int radius)
-
-