java判断点在一个椭圆内部

//判断点在圆内
private boolean inOval(PointBean point,PointBean centerPoint) {
    double v = Math.pow(centerPoint.x-point.x, 2) / Math.pow(a, 2) + Math.pow(centerPoint.y-point.y, 2) / Math.pow(b, 2);
    return v < 1;
}

猜你喜欢

转载自blog.csdn.net/u010052279/article/details/79902623