diff --git a/src/tse/lr2/Circle.java b/src/tse/lr2/Circle.java index 3b384b8..75b7bfe 100644 --- a/src/tse/lr2/Circle.java +++ b/src/tse/lr2/Circle.java @@ -1,13 +1,21 @@ package tse.lr2; +import java.awt.Point; + /** * * @author aNNiMON */ public class Circle extends Ellipse { - public boolean isConsist() { - return false; + public boolean isConsist(Point point) { + Point center = getCenterPoint(); + int radius = center.x - points[0].x; + + double tmp = Math.pow(point.x - center.x, 2); + tmp += Math.pow(point.y - center.y, 2); + + return (tmp <= (radius * radius)); } @Override