import com.henryperrin.pythagoras.geom.Point; import com.henryperrin.pythagoras.geom.Rectangle; public class GeometryExample { public static void main(String[] args) { Point point = new Point(10, 20); Rectangle rectangle = new Rectangle(0, 0, 100, 200); if (rectangle.contains(point)) { System.out.println("The point is inside the rectangle."); } else { System.out.println("The point is outside the rectangle."); } } }


上一篇:
下一篇:
切换中文